MapPoint Forums

MapForums

Community of MapPoint and Virtual Earth Users and Developers




By Right-click displaying context menu on map

This is a discussion on By Right-click displaying context menu on map within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi Wilfried, I need to update myself with VS2005 . On map's right-click event I can make it to show ...


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

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



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 03-07-2006
Junior Member
White Belt
 
Join Date: Feb 2006
Posts: 6
Hi Wilfried,

I need to update myself with VS2005 . On map's right-click event I can make it to show a messagebox or any modal window by starting new thread. But ContextMenu does not show up. On the same thread it does not paint itself properly, but can see its boundary. Showing it on new thread does not do anything.

Thanks for bearing with me and for your great help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12 (permalink)  
Old 03-07-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Hi,

You cannot show a message box in another thread. You have to show it in the same thread context of the main GUI thread.

Be very carefull with thread in dotNet !!!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13 (permalink)  
Old 03-08-2006
Junior Member
White Belt
 
Join Date: Feb 2006
Posts: 6
Hi Wilfried,

It's working now. Thanks for helping me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14 (permalink)  
Old 03-09-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Hi,

Thx for feedback.I'm glad it works for you
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15 (permalink)  
Old 10-02-2007
Junior Member
White Belt
 
Join Date: Oct 2007
Posts: 3
Question Re: By Right-click displaying context menu on map

How do you prevent the popping up of the context menu on your site and make an alert box if anybody rightclicks anywhere on the document in plain old HTML? I have tried onRightClick, and onContextMenu. The box comes up, but it doesn't stop the context window from coming up. Please help soon.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16 (permalink)  
Old 10-03-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Re: By Right-click displaying context menu on map

Hi,

Do you mean with the MP control ? There is a parameter Cancel that can be set to true. About HTML you cannot, you need to use JavaScript.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17 (permalink)  
Old 10-03-2007
Junior Member
White Belt
 
Join Date: Oct 2007
Posts: 3
Question Re: By Right-click displaying context menu on map

Can you use JS w/ HTML??? I tried, and it worked. Some JS scripts I tried on HTML:
<html>
<title>
Scripting
</title>
<body>
<fieldset>
<legend>
Scripts
</legend>
<BODY onContextMenu="javascript:alert(...')">
<BODY onLoad="javascript:alert(...')">
<A NAME="top">Welcome to the Top!
<A HREF="#nbop">Click here to go back!</A><br>(2nd time through)<br>
</HEAD>
<BODY BGCOLOR="FFFFFF" TEXT="000000" LINK="0000FF" VLINK="800080" ALINK="FF0000">
<P>&nbsp;<P><P>&nbsp;<P>
<br><br><br><br><br><br><br>
<CENTER>
<FONT SIZE="+2"><A HREF=""onMouseOver="document.bgColor='black'">Blac k</a>
<A HREF=""onMouseOver="document.bgColor='green'">Gree n</a>
<A HREF=""onMouseOver="document.bgColor='yellow'">Yel low</a>
<A HREF=""onMouseOver="document.bgColor='red'">Red</a>
<A HREF=""onMouseOver="document.bgColor='brown'">Brow n</a>
<A HREF=""onMouseOver="document.bgColor='white'">Whit e</a>
</FONT></CENTER><br>Color onMouseOver<br>
<A HREF="..." onMouseOver="window.status=
...'; return true">Club Penguin</A>.<br>
<A HREF="..." onMouseOver="window.status='...'; return true" onMouseOut="window.status=
'...'; return true">Runescape</A><br>
<A HREF="..."
onMouseOver="parent.location=...";>Dude!</A>o<br>
<A HREF="..."
onMouseOver="alert('...')";>...</A><br>
<A HREF="..."
onClick="alert('...')";>...</A><br>
<FORM>
<INPUT TYPE="button" VALUE="BACK"
onClick="history.go(-1)">
<INPUT TYPE="button" VALUE="FORWARD"
onClick="history.go(1)">
</FORM>OnClick FormBut. Hist<br>
<FORM>
<INPUT TYPE="button"
VALUE="Click To Go To the Bottom Of The Page"
onClick="parent.location='#code'">
</FORM>WIpagel<br>
<FORM>
<INPUT TYPE="button" VALUE="Click Here to Write to Me"
onClick="parent.location='mailto:...'">
</FORM>Mailto<br>
<A NAME="nbop">
<A HREF="#top">Top of Page onClick</A><br>
</fieldset>
<A NAME="code">
</body>
</html>

Of course I used different things instead of ellipses dots.
But can you show me how to altogether eliminate the context bar and display an alert??? This one shows the alert, but doesn't block the context menu (the code for the context menu is near the top).
This is HTML, and the site I learned if off of told me it was also JS. What is going on??? I am just getting into coding, but I am ambitious and want to learn everything. I am working on scripting for now.
Can you give me an example for blocking the context message?
What does MP control mean??? And whats a parameter cancel???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #18 (permalink)  
Old 10-04-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Re: By Right-click displaying context menu on map

Hi,

I'm not sure I understand the problem. Also please put code into [ code ] tags then it is displayed with the right indent for better readability. Do you display the map, so how? This code does not show enough unless I'm not looking well.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #19 (permalink)  
Old 10-09-2007
Junior Member
White Belt
 
Join Date: Oct 2007
Posts: 3
Question Re: By Right-click displaying context menu on map

The other stuff is all other stuff. The only thing that I'm asking about is the <BODY onContextMenu="javascript:alert(...')"> line. It says when you rightclick (or context menu) anywhere in the BODY, it will alert you saying whatever is in the parenthesis. It will display the alert, but still allow the context menu. How do you block the context menu AND display an alert??? And as for the code tags, what are they???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #20 (permalink)  
Old 10-16-2007
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,177
Re: By Right-click displaying context menu on map

Hi,

Quote:
What does MP control mean??? And whats a parameter cancel
I think you use mappoint webservice right ? This forum is for the mappoint desktop version and also for using it embedded in a custom application. There is another forum for the webservice and virtual earth here also.

For the contextmenu you mean the one generated by the browser? You can prevent this for some browsers but not for all. For IE you find an article at msdn: Adding Entries to the Standard Context Menu but this will not work with other browsers. Operan and Firefox will display it. I don't think you can even block this with Firefox. And there are a lots other browsers too included custom made that you can't prevent anything.
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
context, displaying, map, menu, rightclick


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
Disable Context menu Anonymous MapPoint 2006/2009 Discussion 12 12-23-2008 12:05 PM
Click events of context menu are not firing.... Learner MapPoint 2006/2009 Discussion 6 05-12-2008 02:33 PM
Custom context menu Anonymous MapPoint 2006/2009 Discussion 3 09-10-2004 10:15 PM
Extending MapPoint - How about the Context Menu Enhancements Anonymous MapPoint 2006/2009 Discussion 2 02-10-2004 09:38 AM
VB.NET & overriding the map point context menu... Anonymous MapPoint 2006/2009 Discussion 0 09-05-2002 08:25 AM


All times are GMT -5. The time now is 03:59 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 RC2
MP2K Magazine
Visitor Map

Dalaman Holiday
Enjoy a wonderfully peaceful Dalaman holiday... Book through UlookUbook and save!



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 55 56 57 58 59