| RE:MapPoint OCX control does not work on a .Net MDI form.
Thanks for the reply... :)
Sorry, I forgot to mention that the particular code example is C# and that the code is being executed from the form's Load event. The double slash is needed because in C# the backslash is an escape character, ie \t for tab etc... but I'm sure you already knew that and were just covering all the bases.
In any case, I found that for some reason when using a form as an MDI child you cannot use the MapPoint control to open or create a map in the form's Load event. However, if you perform the MapPoint control's map open or create on the Enter event of the MapPoint control itself (which can be called as soon as the form finishes loading) or some other event after the form is loaded, the control works. Go figure. On a non-MDI child form, (aka a regular .Net windows form) there is no problem using the form's Load event to open or create a map.
This MDI issue occurs with both VB.NET and C#.
So in short I got it working but I still wish I knew why... |