Control not updating on Form Load

Nov 19, 2008 at 5:32 PM

 

I'm new to this control and pretty new to C# as well.  I'm trying to have a pushpin placed at a certain location on the map when my form is loaded (form load event).  I use the code below and it's not giving me an error but it's also not putting a pushpin on the map.  If I put a button on the form and have the button call the same code, it places a pushpin on the form without any issues when I click the button.  I also tried putting my code in the Form Activate event but that didn't work either.  Any suggestions are welcome.


SearchLocation
loc = new SearchLocation();
loc.Where =
"Chicago, il";
locations.Add(loc);
MapCtl.VE_FindLocations(locations,
true, true, FindLocationsCallBack);

 

 

Coordinator
Feb 17, 2009 at 2:03 PM
I know this is a very late reaction but I have been busy (holidy, move to other town and marriage) but maybe others have the same problem.

Make sure you have called the InitMap() method before doing anything with the map. In the demo project this call is made in the Shown event of the form. That event occurs after the Activate and Load event.