By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,573 Members | 1,824 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,573 IT Pros & Developers. It's quick & easy.

CTRL Mouse Click

P: n/a
Is there a way to tell when a user, for example, Clicks the right mouse
button while also pressing the Ctrl Key?
Nov 20 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Kevin,

you can use the keydown and keyup events to toggle a variable that tracks
the current state of your ctrl key (e.control). then check your state
variable on the mousedown or click events.
Make sure your form's keypreview property is set to true.

Kirk Graves
"Kevin L" <no_spam@not_real_email.com> wrote in message
news:u%****************@tk2msftngp13.phx.gbl...
Is there a way to tell when a user, for example, Clicks the right mouse
button while also pressing the Ctrl Key?

Nov 20 '05 #2

P: n/a
"Kevin L" <no_spam@not_real_email.com> scripsit:
Is there a way to tell when a user, for example, Clicks the right mouse
button while also pressing the Ctrl Key?


You can check in the 'Click' event if the key is pressed:

\\\
If ((Control.ModifierKeys And Keys.Control) = Keys.Control Then
...
End If
///

--
Herfried K. Wagner
MVP VB Classic, VB.NET
<http://www.mvps.org/dotnet>
Nov 20 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.