Community of VE/MapPoint Users and Developers
This is a discussion on vb6 to vb.net conversion woes within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi All In VB6 on form load of main form I have the following code mc1.OpenMap App.Path + "\MTMap.ptm" mc1.Units ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
|
Sorry to mislead but you can use OpenMap, the following actually works: Public Class Form1 Inherits System.Windows.Forms.Form Public objApp As AxMapPoint.AxMappointControl Public objMap As MapPoint.Map Protected Overrides Sub OnLoad(ByVal e As System.EventArgs) objApp = AxMappointControl1 objMap = objApp.NewMap("C:\TestMap.ptm") objMap = objApp.ActiveMap If objMap Is Nothing Then 'handle errors Exit Sub End If 'Then do everything via objApp and objMap. 'Didn't need to set visible. End Sub I can't see the basic diference but it works if thats any help? Roger |
| |||
|
Please ignore previous posting this is what I should have said: Sorry to mislead but you can use OpenMap, the following actually works: Public Class Form1 Inherits System.Windows.Forms.Form Public objApp As AxMapPoint.AxMappointControl Public objMap As MapPoint.Map Protected Overrides Sub OnLoad(ByVal e As System.EventArgs) objApp = AxMappointControl1 objMap = objApp.OpenMap("C:\TestMap.ptm") objMap = objApp.ActiveMap If objMap Is Nothing Then 'handle errors Exit Sub End If 'Then do everything via objApp and objMap. 'Didn't need to set visible. End Sub End Class I can't see the basic diference but it works if thats any help? Roger |
![]() |
| Tags |
| conversion, vb6, vbnet, woes |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Lat/Long conversion | klomp63 | MapPoint 2006/2009 Discussion | 1 | 03-14-2006 03:29 PM |
| OLEVariant conversion | phoque | MapPoint 2006/2009 Discussion | 1 | 10-10-2005 01:44 PM |
| Help Re Conversion please | Ticker | MapPoint 2006/2009 Discussion | 2 | 11-09-2004 11:25 AM |
| Coordinate conversion | Matrices | MapPoint 2006/2009 Discussion | 3 | 10-03-2003 08:13 AM |
| ED50 to wgs84 conversion | Nicou | MapPoint 2006/2009 Discussion | 2 | 04-25-2003 03:22 AM |