Re: Simulating a Right Click
"Bhatnagar, Amit" <[email protected]> Tue, 13 May 2008 09:31:54 -0600
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
I like the "clicking on a button that stays down to put it in the alternative mode, then clicking as normal" suggestion as it would be the easiest for the users to adopt. But how would you implement this? After putting the application in "right click mode", would I intercept the WM message in my WndProc override?=20 -----Original Message----- From: Discussion forum for developers using Windows Forms to build apps and controls [mailto:[email protected]] On Behalf Of Chris Anderson Sent: Friday, April 25, 2008 11:57 AM To: [email protected] Subject: Re: [DOTNET-WINFORMS] Simulating a Right Click On touch screens, a normal right-click is often performed by simply pressing and holding the stylus/finger on the screen. After a second or so, the right-click will fire. However on a touch screen, few users know the above (and some screens don't even support it), so it makes sense to change the method of input completely (perhaps by clicking on a button that stays down to put it in the alternative mode, then clicking as normal) > I have a touch screen application where there is a need to perform a=20 > right click to expose context menus etc. The app's main point of=20 > interaction is a "toolbar" of buttons at the bottom of the screen=20 > (think Mac OSX dock, or Gnome/KDE panel, etc), so I imagine sticking a > Right Click button down there. >=20 > But how would this work? I imaging sending a WM_ message for right=20 > click, but if the user moves the cursor to the target of the right=20 > click, and then has to press a button on the toolbar, the cursor is no > longer on the target and thus the right click message would happen on=20 > the Right Click button on the toolbar. Essentially what I am saying is > that the cursor would move off the target object down to the toolbar=20 > button when the right click message would be sent. >=20 > How can I have a button that I can press to perform a right click=20 > without having the cursor move away from the target object? The information contained in this e-mail message is PRIVATE. It may = contain confidential information and may be legally privileged. It is = intended for the exclusive use of the addressee(s). If you are not the = intended recipient, you are hereby notified that any dissemination, = distribution or reproduction of this communication is strictly = prohibited. If the intended recipient(s) cannot be reached or if a = transmission problem has occurred, please notify the sender immediately = by return e-mail and destroy all copies of this message.=20 Thank you.=20