MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




the map is empty after Show/Hide form with MapPoint control

This is a discussion on the map is empty after Show/Hide form with MapPoint control within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; In the C# Console Application project I have to hide and show form with MapPoint Control on it. I have ...


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 Thread Tools Display Modes
  #1 (permalink)  
Old 06-10-2003
Senior Member
Black Belt
 
Join Date: Jul 2002
Posts: 5,138
the map is empty after Show/Hide form with MapPoint control

In the C# Console Application project I have to hide and show form with MapPoint Control on it. I have to be able to hide and show a form without closing and saving map every time. Calling the Form.Hide() method causes the MapPoint control loose a map and move control to the UNINITIALIZED state.

The code from the console application:

Form1 MapFormInst;
MapFormInst = new Form1();
//MapFormInst.ShowDialog(); //if I uncomment this line the next line causes the exception
MapFormInst.axMappointControl1.NewMap(MapPoint.Geo MapRegion.geoMapNorthAmerica);
MapFormInst.ShowDialog(); //shows a map
// calling the Form.Hide() by ckicking the Hide button on the from
MapFormInst.ShowDialog(); //doesn't show a map

If I try to hide and show control while form is visible. It works fine. However if I try to close a map and open a new one while MapPointControl is invisible it causes the exception with the message that to perform that method (NewMap) the MapPointControl has to be in the available state. Is the MapPoint Control was developed this way the it has to open,save and close a map every time when you have to show and hide the form? Do you have any other suggestions how to hide a form instead of using Form.Hide() method?
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-25-2004
Junior Member
White Belt
 
Join Date: Jun 2003
Posts: 5
Re: the map is empty after Show/Hide form with MapPoint cont

I have the same problem.

The long initializing time of the NewMap method obligates me to let my Form always open. So I have to use the Hide methode of the Form (or Form.Visible = False) but the mappoint control move alway to the UNINITIALIZED State. This cause a lot of errors (nothing with the control work) and try to do the NewMap method again cause an error too.

Someone knows how to keep the Control Initisalized although the form is hide then show?
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, empty, form, map, mappoint, show or hide


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
Show or Hide Places Anonymous MapPoint 2006/2009 Discussion 0 04-24-2004 10:19 AM
Show or Hide Places Anonymous Wish List 0 04-24-2004 10:11 AM
show/hide places Anonymous MapPoint 2006/2009 Discussion 0 11-06-2003 10:36 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:00 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