PDA

View Full Version : mappoint 2002 in vb.net on a mdi child



superdave
09-21-2002, 10:04 PM
I am trying to use a mappoint 2002 control on a mdi child form in vb.net and always get

"An unhandled exception of type 'System.ArgumentException' occurred in axinterop.mappoint.dll
Additional information: MapPoint failed to load. The cause of this failure is unknown."

The error occurs at the .openmap method which is called on the form load.

This is the code used to launch the form
Dim fMap As New frmMap()
fMap.MdiParent = Me
fMap.Show()

If I comment out the 'fMap.MdiParent = Me' it loads fine and displays the map.

I have seen some other people in user group postings with the same problem in vb.net and C#.net , but , no one with a fix???

superdave
09-26-2002, 11:00 AM
Ok,

I was able to get this working now by opening the map in a timer after the form was loaded. For some reason in vb.net on an mdi child it would
not work from the form load.

Now I am having the same problem I was having in VB6. Mappoint keeps blowing its container. When the form loads up, the mappoint application is loaded outside of its control container. If I unload the form then load it back Mappoint closes and it works fine (inside the container). The form loads fine every other time until I reboot the machine. I have reinstalled mappoint on 2 machines and still have the same problem.