NeoSoft Support Forum Forum Index  Your source for Plug-Ins, sample publications, source code and more...

Source Language:
Translate to:

NeoSoft Support Forum
NeoSoft Community Support Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   SmartFeedSmartFeed   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Ctrl Click ?

 
Post new topic   printer-friendly view   Reply to topic    NeoSoft Support Forum Forum Index -> General NeoBook Discussions
View previous topic :: View next topic  
Author Message
David de Argentina
NeoBooker


Joined: 04 Apr 2005
Posts: 925
Location: Buenos Aires, Argentina

PostPosted: Mon Nov 17, 2008 12:33 pm    Post subject: Ctrl Click ? Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
bunker
NeoBooker


Joined: 29 Sep 2007
Posts: 111

PostPosted: Mon Nov 17, 2008 1:30 pm    Post subject: Reply with quote

Hi David...maybe with tmEventes from techmedia.

Greetings
_________________

NeoBooKeRoS.CoM.aR
Back to top
View user's profile Send private message
Gaev
NeoBooker


Joined: 01 Apr 2005
Posts: 4321
Location: Toronto, Canada

PostPosted: Mon Nov 17, 2008 1:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
David de Argentina
NeoBooker


Joined: 04 Apr 2005
Posts: 925
Location: Buenos Aires, Argentina

PostPosted: Fri Jan 29, 2010 11:49 am    Post subject: Reply with quote

Thanks a lot Gaev,

Could you post a sample ?

Thanks in advance,
David de Argentina
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Gaev
NeoBooker


Joined: 01 Apr 2005
Posts: 4321
Location: Toronto, Canada

PostPosted: Fri Jan 29, 2010 1:33 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    NeoSoft Support Forum Forum Index -> General NeoBook Discussions All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

Forum content © 2008 NeoSoft Corp. All rights reserved.