MapPoint Forums

MapForums

Community of MapPoint and Bing Maps Users and Developers




MapPoint 2006 ActiveX with new Form

This is a discussion on MapPoint 2006 ActiveX with new Form within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi there, same probleme again. I included the MapPoint Control 13.0 in a Visual Studio Project, made a Button on ...


Go Back   MapPoint Forums > Map Forums > MapPoint Desktop Discussion

Today's Posts Twitter Feed Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-01-2007
Member
Yellow Belt
 
Join Date: Jul 2007
Posts: 45
Question MapPoint 2006 ActiveX with new Form

Hi there,
same probleme again.
I included the MapPoint Control 13.0 in
a Visual Studio Project, made a Button
on my Form and did this:

Form myForm = new Form();
AxMappointControl mapPoint = new AxMappointControl();
myForm.Controls.Add(mapPoint);
mapPoint.NewMap(MapPoint.GeoMapRegion.geoMapEurope );
myForm.Show();

On Line mapPoint.NewMap(...) i get System.Windows.Forms.AxHost+InvalidActiveXStateExc eption

if i try this:

Form myForm = new Form();
myForm.Show();
AxMappointControl mapPoint = new AxMappointControl();
myForm.Controls.Add(mapPoint);
mapPoint.NewMap(MapPoint.GeoMapRegion.geoMapEurope );

everything works fine

Where is the probleme?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 08-01-2007
Member
Yellow Belt
 
Join Date: Jul 2007
Posts: 45
Re: MapPoint 2006 ActiveX with new Form

Hi there, no, i won't write "I got the solution, thanks, bye".

The problem was that the activeX wasn't completly
initialized, in which way ever the show method of the
form called the EndInit() Method of the ActiveX and made
the usage afterwards possible.

Solution: Just call it yourself.
Form myForm = new Form();
AxMappointControl mapPoint = new AxMappointControl();
myForm.Controls.Add(mapPoint);
mapPoint.EndInit(); // <- That's the way
mapPoint.NewMap(MapPoint.GeoMapRegion.geoMapEurope );
myForm.Show();

Sry for my bad and irritating english, i'm german an not quite
used to write or talk in english. Hope this helps some of you.

Give me some hinds if the problem was totally clear and i'm just
dumb ^^
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
activex, form, mappoint 2006


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads

Thread Thread Starter Forum Replies Last Post
Mappoint and Access with ActiveX On A Form jpateusa MapPoint Desktop Discussion 5 05-16-2009 06:32 PM
MapPoint 2006 with ActiveX jasanite MapPoint Desktop Discussion 4 08-10-2007 10:05 AM
VC++ doesn't find MapPoint 2006 ActiveX control DrNobody MapPoint Desktop Discussion 3 02-22-2007 09:41 AM
Mappoint 2006 ActiveX Questions ben_dillon MapPoint Desktop Discussion 3 01-31-2007 06:16 AM
mapPoint 2006 activex control slow down form closing bule MapPoint Desktop Discussion 1 09-26-2006 01:22 PM


All times are GMT -5. The time now is 05:02 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.5.0 RC3
MP2K Magazine
Visitor Map



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69