Re: Simulating a Right Click

John Warner <[email protected]> Tue, 13 May 2008 11:51:53 -0400
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Organization John Warner
Message-ID <009e01c8b511$4392ba20$3d02a8c0@Pluto>
Have a quick look at the Button Base class it might save you digging
through the API


http://msdn.microsoft.com/en-us/library/system.windows.controls.primitive=
s.
buttonbase.aspx



John Warner




> -----Original Message-----
> From: Discussion forum for developers using Windows Forms to=20
> build apps and controls=20
> [mailto:[email protected]] On Behalf Of=20
> Bhatnagar, Amit
> Sent: Tuesday, May 13, 2008 11:32 AM
> To: [email protected]
> Subject: Re: [DOTNET-WINFORMS] Simulating a Right Click
>=20
>=20
> I like the "clicking on a button that stays down to put it in=20
> the alternative mode, then clicking as normal" suggestion as=20
> it would be the easiest for the users to adopt. But how would=20
> you implement this? After putting the application in "right=20
> click mode", would I intercept the WM message in my WndProc override?=20
>=20
> -----Original Message-----
> From: Discussion forum for developers using Windows Forms to=20
> build apps and controls=20
> [mailto:[email protected]] On Behalf Of=20
> Chris Anderson
> Sent: Friday, April 25, 2008 11:57 AM
> To: [email protected]
> Subject: Re: [DOTNET-WINFORMS] Simulating a Right Click
>=20
> On touch screens, a normal right-click is often performed by=20
> simply pressing and holding the stylus/finger on the screen.=20
> After a second or so, the right-click will fire.
>=20
> However on a touch screen, few users know the above (and some=20
> screens don't even support it), so it makes sense to change=20
> the method of input completely (perhaps by clicking on a=20
> button that stays down to put it in the alternative mode,=20
> then clicking as normal)
>=20
> > 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=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=20
> sticking a
>=20
> > 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=20
> > click, and then has to press a button on the toolbar, the=20
> cursor is no
>=20
> > longer on the target and thus the right click message would=20
> happen on
> > the Right Click button on the toolbar. Essentially what I=20
> am saying is
>=20
> > 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?
>=20
> The information contained in this e-mail message is PRIVATE.=20
> It may contain confidential information and may be legally=20
> privileged. It is intended for the exclusive use of the=20
> addressee(s). If you are not the intended recipient, you are=20
> hereby notified that any dissemination, distribution or=20
> reproduction of this communication is strictly prohibited. If=20
> the intended recipient(s) cannot be reached or if a=20
> transmission problem has occurred, please notify the sender=20
> immediately by return e-mail and destroy all copies of this message.=20
> Thank you.=20
>=20