469,935 Members | 1,924 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,935 developers. It's quick & easy.

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



i use

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

but the system promote the the type cant +

who can help me ~
Nov 15 '05 #1
1 1343
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

--------------------
Reply-To: "vulgate" <vu*******@hotmail.com>
From: "vulgate" <vu*******@hotmail.com>
Subject: how to know the user press the left button and the right button at the same time?Date: Sat, 15 Nov 2003 22:42:50 +0800
i use

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

but the system promote the the type cant +

who can help me ~


Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Chris Millar | last post: by
1 post views Thread by DotNetMania | last post: by
4 posts views Thread by planetthoughtful | last post: by
2 posts views Thread by Garry Jones | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.