How to properly close mappoint control

Anonymous
03-02-2005, 09:50 AM
Hi,
i'm having some issues with mappoint crashings randomly.. we are using the active X control..

here is how i'm creating the control:

Licenses.Add "MapPoint.Control", "Mappoint Control 9.0 Runtime License"
Set mobjMap = Controls.Add("MapPoint.Control", "mpcMap")

and this is how i'm closing everything.

mobjMap.object.ActiveMap.Saved = True
mobjMap.object.CloseMap
Set mobjMap = Nothing
Set mobjItem = Nothing
Set mobjPushPin = Nothing
Controls.Remove "mpcMap"

should i be doing something else?

rgds
chris

p.s. mobjMap is defined as VBControlExtender and this is because not all the developers have mappoint installed.. doing it this way means they don't need it to compile..

Wilfried
03-03-2005, 08:05 AM
Hi Chris,

I'm not sure, but I think these 2 hase to be the last ones in this exact sequence:

Set mobjMap = Nothing
Controls.Remove "mpcMap"

 
Web mp2kmag.com
mapforums.com