MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Un-cooperative Popup

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 10-20-2007
Junior Member
Yellow Belt
 
Join Date: May 2007
Posts: 28
Unhappy Un-cooperative Popup

Hi

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)
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 10-21-2007
Junior Member
Yellow Belt
 
Join Date: May 2007
Posts: 28
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
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 10-23-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
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.
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 10-23-2007
Junior Member
Yellow Belt
 
Join Date: May 2007
Posts: 28
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
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 10-23-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
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.
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 10-23-2007
Junior Member
Yellow Belt
 
Join Date: May 2007
Posts: 28
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
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 10-23-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,055
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.
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 10-23-2007
Junior Member
Yellow Belt
 
Join Date: May 2007
Posts: 28
Re: Un-cooperative Popup

Hi Wilfred,

Thanks for the support, I will try out the timer suggestion and let you know who it goe’s.

Regards,
Joe
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


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
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


All times are GMT -5. The time now is 12:51 AM.


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

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!


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