Re: Simulating a Right Click
Chris Anderson <[email protected]> Fri, 25 Apr 2008 18:57:09 +0100
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
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 > right click to expose context menus etc. The app's main point of > interaction is a "toolbar" of buttons at the bottom of the screen > (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 > click, but if the user moves the cursor to the target of the right > 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 > 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 > 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 > without having the cursor move away from the target object?