MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




MapPoint control and MDI form

This is a discussion on MapPoint control and MDI form within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I am using C# 2005 with the MapPoint control from MapPoint 2006. I have 2 forms in a MDI container. ...


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 (2) Thread Tools Display Modes
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 03-21-2007
Junior Member
White Belt
 
Join Date: Nov 2006
Posts: 2
MapPoint control and MDI form

I am using C# 2005 with the MapPoint control from MapPoint 2006. I
have 2 forms in a MDI container. The sequence I go through is to put
the MapPoint control on Form1. On the load of the app I show Form1 in
the MDI container. Then on click I show Form2 (notice I do not hide
Form1). I then click a button on Form2 to show Form1. When Form1 was
shown the first time it asked me to save it (which was undesireable
behavior) so I put this code in the Form1_Deactivate method:
axMap.ActiveMap.Saved = true;


Now when I go back to Form1 the control is empty and worse yet the
ActiveMap == null. How did the control decide to unload my map? How do
I get around this?
Any help, links, or pointers appreciated.
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 03-22-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: MapPoint control and MDI form

Hi,

I dont know direct what is wrong, but it should work. I have a few applications where I create new instances of a form with a mappoint control on it, and show them in parallel.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 03-23-2007
Junior Member
White Belt
 
Join Date: Nov 2006
Posts: 2
Re: MapPoint control and MDI form

are the forms you create in paralell MDIChildren in an MDIContainer? Also, does one form not have a map point control on it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 03-25-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: MapPoint control and MDI form

Hi,

No, in C# I use SourceForge.net: DockPanel Suite from weifenluo. In Delphi I have MDI forms. All created forms has a control on it at design time.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 04-19-2007
Junior Member
White Belt
 
Join Date: Apr 2007
Posts: 6
Re: MapPoint control and MDI form

Quote:
Originally Posted by ddsoft View Post
I am using C# 2005 with the MapPoint control from MapPoint 2006. I
have 2 forms in a MDI container. The sequence I go through is to put
the MapPoint control on Form1. On the load of the app I show Form1 in
the MDI container. Then on click I show Form2 (notice I do not hide
Form1). I then click a button on Form2 to show Form1. When Form1 was
shown the first time it asked me to save it (which was undesireable
behavior) so I put this code in the Form1_Deactivate method:
axMap.ActiveMap.Saved = true;


Now when I go back to Form1 the control is empty and worse yet the
ActiveMap == null. How did the control decide to unload my map? How do
I get around this?
Any help, links, or pointers appreciated.
I had the same problem. I had to speed up the loading of the map so I loadeda the form when the application started, and then uset Hide() to make it invisible. Well, in that moment MapPoint tryes to be clever and closes the map. So the solution is to set the border to None, and the size to (0,1) so the form becomes virtualy inivisible. Note: when using size (0,0) the application goes crazy and consumes 100% proc power.

Was this useful?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 04-20-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: MapPoint control and MDI form

Quote:
Originally Posted by Marin View Post
I had the same problem. I had to speed up the loading of the map so I loadeda the form when the application started, and then uset Hide() to make it invisible. Well, in that moment MapPoint tryes to be clever and closes the map. So the solution is to set the border to None, and the size to (0,1) so the form becomes virtualy inivisible. Note: when using size (0,0) the application goes crazy and consumes 100% proc power.
I have a few applications where I use the ActiveX control invisible, and I create it in code. No need to put it on a form and this also works. So this looks another approach.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 04-30-2007
Junior Member
White Belt
 
Join Date: Apr 2007
Posts: 6
Re: MapPoint control and MDI form

Quote:
Originally Posted by Wilfried View Post
Hi,

No, in C# I use SourceForge.net: DockPanel Suite from weifenluo. In Delphi I have MDI forms. All created forms has a control on it at design time.
I tryed to use DockPanel but when I try to dock a floating window with a MapPoint control, the control closes the map and then the map dissapears. Have you had the same problem?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 05-03-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Re: MapPoint control and MDI form

Hi,

No I do not have that problem. Very wierd...
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
control, form, mappoint, mdi


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/mappoint-control-mdi-form-5766.html

Posted By For Type Date
Working With Excel and MapPoint - MP2K Magazine This thread Refback 03-29-2007 06:21 AM
Programming MapPoint in .NET - MP2K Magazine This thread Refback 03-25-2007 08:27 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 activex control slow down form closing bule MapPoint 2006/2009 Discussion 1 09-26-2006 02:22 PM
the map is empty after Show/Hide form with MapPoint control Anonymous MapPoint 2006/2009 Discussion 1 03-25-2004 04:24 PM
Alignment of the control on my form blackmap MapPoint 2006/2009 Discussion 2 09-25-2003 02:43 AM
MapPoint Control align in Form blackmap MapPoint 2006/2009 Discussion 0 02-06-2003 11:26 AM
MapPoint OCX control does not work on a .Net MDI form. clackclack MapPoint 2006/2009 Discussion 5 12-06-2002 12:17 AM


All times are GMT -5. The time now is 04:04 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