Groups | Blog | Home
all groups > c# > november 2003 >

c# : how to know the user press the left button and the right button at the same time?


vulgate
11/15/2003 10:42:50 PM


i use

arg.button==( MouseButtons.Left+MouseButtons.Right)

but the system promote the the type cant +

who can help me ~

bz125 NO[at]SPAM online.microsoft.com
11/18/2003 8:21:33 PM
Hi there,
have you tried using the "bitwise or" operator (|) instead?

According to MSDN (look for "MouseButtons Enumeration"):

"Specifies constants that define which mouse button was pressed.
This enumeration has a FlagsAttribute attribute that allows a bitwise
combination of its member values."


Good luck!

-Matteo

--------------------
[quoted text, click to view]
AddThis Social Bookmark Button