| View previous topic :: View next topic |
| Author |
Message |
David de Argentina NeoBooker

Joined: 04 Apr 2005 Posts: 925 Location: Buenos Aires, Argentina
|
Posted: Mon Nov 17, 2008 12:33 pm Post subject: Ctrl Click ? |
|
|
Hi all,
Internet Explorer ( or Webbrowser object ) has multiple purposes ( shows webpages, images, PDF Files, etc ).
Webbrowser object allows to retrieve the original Internet Explorer context menu... but I need to retrieve my own context menu.
Is for this reason, I'm trying to create a shorcut in order to create a special context menu.
I'm trying to define ... for example: Control key + Right click.
But the accelerator keys for button object doesn't allow this combination.
Are there any plugin that could trap this event ?
Any ideas ?
Thanks in advance
David de Argentina |
|
| Back to top |
|
 |
bunker NeoBooker

Joined: 29 Sep 2007 Posts: 111
|
Posted: Mon Nov 17, 2008 1:30 pm Post subject: |
|
|
Hi David...maybe with tmEventes from techmedia.
Greetings _________________
NeoBooKeRoS.CoM.aR |
|
| Back to top |
|
 |
Gaev NeoBooker

Joined: 01 Apr 2005 Posts: 4321 Location: Toronto, Canada
|
Posted: Mon Nov 17, 2008 1:59 pm Post subject: |
|
|
David de Argentina:
You control the Context Menu in a IE Window (or Browser Object) via code inside the html page being displayed ... if I recall correctly ...
i) you trap the "on Right Click" event
ii) set Context Menu's Display property to False
iii) display your message via an absolutely positioned <span></span> block ... there is no native code that I know of for making a menu block ... so you may have to simulate one .... also, you can do a callback to a Neobook subroutine ... which can position a NeoBook object on top of the Browser object ... to make it look like it is part of the Browser object.
Gaev _________________ Gaev
http://www.scriptedlogic.com/ |
|
| Back to top |
|
 |
David de Argentina NeoBooker

Joined: 04 Apr 2005 Posts: 925 Location: Buenos Aires, Argentina
|
Posted: Fri Jan 29, 2010 11:49 am Post subject: |
|
|
Thanks a lot Gaev,
Could you post a sample ?
Thanks in advance,
David de Argentina |
|
| Back to top |
|
 |
Gaev NeoBooker

Joined: 01 Apr 2005 Posts: 4321 Location: Toronto, Canada
|
Posted: Fri Jan 29, 2010 1:33 pm Post subject: |
|
|
David de Argentina:
I don't have a ready made sample ... but you can get details from this page on the Microsoft developer Network website ...
http://msdn.microsoft.com/en-us/library/ms536914%28VS.85%29.aspx
... when the user clicks on the right mouse button, the oncontextmenu event is triggered ... if you do not want the standard response (i.e. display of context menu items) to be taken by the Browser, you do something like this ... | Code: | <span style="width: 300px; background-color: blue; color: white;"
oncontextmenu="return false">
The context menu never displays when you right-click in this box. </span> |
If you want the Browser to invoke your own javascript/dhtml commands to be serviced, you can ...
- insert them (separated by semi-colons) before the return false
or
- specify oncontextmenu = "someFunction()" ... and then have a function like ... | Code: | function someFunction()
{
//your other javascript/dhtml commands here
return false;
} | ... in the <head> section of your document ... the commands can include the special commands to interact (variables, actions) with the hosted NeoBook Application ... and those that query the state of the Alt or Ctrl key (as described in the above referenced web page).
Depending on your Application design/requirement, you can specify the oncontextmenu parameter in the <body> tag of your document or in the tags of specific elements of your document. _________________ Gaev
http://www.scriptedlogic.com/ |
|
| Back to top |
|
 |
|