Community of VE/MapPoint Users and Developers
This is a discussion on Un-cooperative Popup within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi Firstly my apologies, this is the second posting on this issue, I need to get to the bottom of ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Firstly my apologies, this is the second posting on this issue, I need to get to the bottom of this. I am using visual studio 2005 (vb.net) to control a mappoint 2004 activex control. When the user clicks a position the map a pushpin is added and the latitude/longitude is placed onto a record. This works really well until the user clicks on a location where there is underlying information, this causes mappoint to pop a dialog with the location information. The suggested fix is to cancel the pop up on the beforedouble click event on the active x control I have attempted to do this with no success. I have included the opening lines of the code below; can anyone give me the definitive answer to this problem? Any help appreciated Joe Code: Private Sub AxMappointControl1_BeforeDblClick(ByVal sender As System.Object, ByVal e As AxMapPoint._IMappointCtrlEvents_BeforeDblClickEven t) Handles AxMappointControl1.BeforeDblClick Try e.cancel = True ‘should I be sending cancel some other way Dim objMap As MapPoint.Map objMap = Me.AxMappointControl1.ActiveMap Dim objDataSet As MapPoint.DataSet Dim txt1, txt2, txt0, txt4 As String Dim Ilat, Ilong As Double Dim objResult As Object Dim objResults As MapPoint.FindResults objResults = objMap.ObjectsFromPoint(e.x, e.y) |
| |||
| Re: Un-cooperative Popup Hi Doesn’t look as though I am getting anywhere with this, I will try and elaborate. The information I have been able to find on the mappoint support sites suggest that to cancel the popup menu when the active map is double clicked you should use cancle in the before double click event, in looks as though the way the event is called has altered in vb.net from: Private Sub AxMappointControl1_BeforeDblClick(ByVal Button As Long, ByVal Shift As Long, ByVal X As Long, ByVal Y As Long, Cancel As Boolean) To: Private Sub AxMappointControl1_BeforeDblClick(ByVal sender As System.Object, ByVal e As AxMapPoint._IMappointCtrlEvents_BeforeDblClickEven t) Handles AxMappointControl1.BeforeDblClick In the mappoint section on msdn it suggests that you can cancel the event by setting cancel = true. In the newer version the equivalent (as I read it) would be to set e.cancel = true. But this doe’s not cancel the event???? Regards, Joe |
| |||
| Re: Un-cooperative Popup
Hi, you are correct about e.cancel = true; But I think you want to use the BeforeClick instead fo the BeforeDblClick event.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Un-cooperative Popup
Hi wilfred Thanks for your post, you are correct, I added the cancel event to the before click event and this corrected the problem, it also created another, I want my user to be able to scroll on the map but these controls are canceled at he same time as the popup! Am I correct in assuming that their is no work around to this apart from providing the controls elsewhere. Regards, Joe |
| |||
| Re: Un-cooperative Popup
Hi, you mean by scroll the 'pan' map when the white arrows are visible if mouse pointer is near the edges ? if yes many things you can do I think, I should solve it by putting 4 transparent panels on the map and handle the panning of the map from there. You can give a custom cursor to each panel, also for the directions NE, NW, etc you can change cursor. If you want the user to be not able to do any control on the map (unless the pan) you can put a large transparent panel on the map. This will then intercept not only mouse clicks but also keyboard. Then you have it all in control.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Un-cooperative Popup Hi Wilfred, That sounds exactly what I need to do, one question how do I get the code block to pan the map to repeat whilst the mouse is over the panel? For example if I use this: Dim objMap As MapPoint.Map objMap = Me.AxMappointControl1.ActiveMap objMap.Pan(MapPoint.GeoPanCmd.geoNorthEast) I get one map movement, how do I get the code to run continueslly. Regards, Joe |
| |||
| Re: Un-cooperative Popup
Hi, I use a timer for this. use MouseDown and MouseUp events to enable / disable the timer. Set the interval to 1 millisecond (this will interval exactly one timeslice which is 10 ms on workstation and 20 ms on server OS. Take a panFactor of 0.07 to start. This will be a good start. instead of a timer you can also use a custom message handler, but I think a timer is wise to use in this case.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Gaia-3 with Microsoft Virtual Earth Supports NSDI Cooperative Agreement Program | VE For Government | Virtual Earth Blogs | 0 | 10-17-2007 09:41 AM |
| Problem using PopUp property in Access Form | PMACAFEE | MapPoint 2006/2009 Discussion | 4 | 11-12-2006 09:45 PM |
| Disable Mappoin 2002 PopUp Menu (using Vb.net) | Anonymous | MapPoint 2006/2009 Discussion | 0 | 08-19-2003 09:12 AM |
| Is there any way to disable Mappoint 2002 popup menu? | Anonymous | MapPoint 2006/2009 Discussion | 2 | 12-12-2002 05:21 PM |
| 7/25/01 Ed: How does one inhibit the popup save .... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 07-30-2001 06:57 AM |
French Alps Ski Holidays
For French Alps ski holidays to remember visit Holiday Hypermarket. Booking is great value and simple. Pick a holiday to suit you today.
Business Travel Agent
Book your business travel with a specialist business travel agent. Travel Counsellors are an award winning travel agent.
Cheap Flight Canada
Making a cheap flight to Canada can become a reality when you book online with dealchecker.co.uk. Our simple search allows you to see for yourself who is the cheapest.
Holidays to Cuba
For the best offers on holidays to Cuba, visit The Holiday Place today. Find a deal to suit you and your budget online!
Cheap Turkey Holidays
The best time of year to sneak in cheap Turkey holidays is during the off-peak season. Check out the great deals available during April, May or October. For other tips on how to bag a great value holiday simply check online at ulookubook.com
Cheap package holidays
Use Travel.co.uk to find the best cheap package holidays available. Have fun and save money at the same time
Cheap Holidays to Lanzarote
Visit the Canary Islands, even if you're cash strapped! View cheap holidays to Lanzarote at On The Beach!