MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




MapPoint 2006 ActiveX with new Form

This is a discussion on MapPoint 2006 ActiveX with new Form within the MapPoint 2006/2009 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 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (5) Thread Tools Display Modes
  5 links from elsewhere to this Post. Click to view. #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


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/mappoint-2006-activex-new-form-6118.html

Posted By For Type Date
gmane.comp.gis.mappoint This thread Refback 06-02-2008 05:53 PM
Gmane -- Mail To News And Back Again This thread Refback 01-19-2008 12:04 PM
MapPoint Download - MP2K Magazine This thread Refback 08-09-2007 09:23 PM
Working With Excel and MapPoint - MP2K Magazine This thread Refback 08-02-2007 03:23 AM
MapPoint Forums This thread Refback 08-01-2007 10:35 PM

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 2006 with ActiveX jasanite MapPoint 2006/2009 Discussion 4 08-10-2007 11:05 AM
VC++ doesn't find MapPoint 2006 ActiveX control DrNobody MapPoint 2006/2009 Discussion 3 02-22-2007 10:41 AM
Mappoint 2006 ActiveX Questions ben_dillon MapPoint 2006/2009 Discussion 3 01-31-2007 07:16 AM
Mappoint and Access with ActiveX On A Form jpateusa MapPoint 2006/2009 Discussion 4 01-30-2007 11:19 PM
mapPoint 2006 activex control slow down form closing bule MapPoint 2006/2009 Discussion 1 09-26-2006 02:22 PM


All times are GMT -5. The time now is 12:08 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
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