View Single Post

  #1 (permalink)  
Old 07-23-2004
starbuck's Avatar
starbuck starbuck is offline
Member
Green Belt
 
Join Date: Oct 2003
Posts: 68
vb6 to vb.net conversion woes

Hi All

In VB6 on form load of main form I have the following code

mc1.OpenMap App.Path + "\MTMap.ptm"
mc1.Units = geoMiles
mc1.Visible = True
mc1.ActiveMap.DragBehavior = 2
mc1.ActiveMap.AllowEdgePan = True
mc1.ItineraryVisible = False
Map_Resize

In vb.net I have the following

mc1.OpenMap(MTDir + "\MTMap.ptm")
mc1.Units = MapPoint.GeoUnits.geoMiles
mc1.Visible = True
mc1.ActiveMap.DragBehavior = 2
mc1.ActiveMap.AllowEdgePan = True
mc1.ItineraryVisible = False
Map_Resize()

And I get the following error on the first line - Exception of type InvalidActiveXStateException was thrown.

Any thoughts folks, I am using a the ocx on the main form

Thanks in advance
Reply With Quote