473,396 Members | 1,895 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CTRL Mouse Click

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
2 13370
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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: JMBollard | last post by:
I am working on a Swing application (Java 1.4 ) and I am having trouble implementing the following functionality: A JTextField that should not be part of focus traversal (should not be tabbed to),...
0
by: Kevin Nelson | last post by:
Has anyone experienced this before. I have a web project/application. One of the files in this application is a SQL Script file. When I use Ctrl+A to select all of the text of the file VS Net...
1
by: Marek Mänd | last post by:
How to prevent selecting table cells with CTRL+mouse left click in Gecko based browsers?
1
by: andrey.korolev | last post by:
How to disable opening link in new tab when I pressing left mouse button holding CTRL on it?
8
by: MLH | last post by:
I use a mouse-down procedure to trap right mouse clicks and CTRL-Right mouse clicks. Running the procedure must put honey or some other sticky substance into my keyboard because subsequent...
14
by: Amar | last post by:
Hi All, I am a newbie to PHP and have the task to create a page using PHP where in that page I need to disable all key operation as well as mouse operation even also the menu operation that...
7
by: =?Utf-8?B?QWxleCBLLg==?= | last post by:
Hi all When processing datagrid's MouseDown event, I need to know if Ctrl key is currently pressed. Is there any way to check this? It would help if I had keyUp and KeyDown events for Ctrl key...
0
by: johnmcpherson1 | last post by:
What's the best method for detecting a ctrl key being depressed simultaniously with a right mouse click in a datagrid in a vb application? I need to get row, field resolution. Regards, John
1
by: Andrus | last post by:
I need to save font selected by user by Ctrl+MouseWheel in Winforms RichTextBox. I tried override below but this does not remember font: in this method Font.Size property seems to be always...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.