PC Review


Reply
Thread Tools Rate Thread

Determine if Shift is down?

 
 
Ben Dilts
Guest
Posts: n/a
 
      14th Jul 2003
Using VB.NET, is there a way to determine if the Shift key
is down (or the Control key, etc.)?



~BenDilts( void );
 
Reply With Quote
 
 
 
 
Jay B. Harlow [MVP - Outlook]
Guest
Posts: n/a
 
      14th Jul 2003
Ben,
From a Control (remember Form is derived from Control). You can use the
Control.ModifierKeys property.

Control also has a Control.MouseButtons property to find the state of the
mouse buttons.

These are Shared/Static so they can be used when you do not have an instance
of a Control/Form.

Hope this helps
Jay

"Ben Dilts" <(E-Mail Removed)> wrote in message
news:049501c34a44$034941b0$(E-Mail Removed)...
> Using VB.NET, is there a way to determine if the Shift key
> is down (or the Control key, etc.)?
>
>
>
> ~BenDilts( void );



 
Reply With Quote
 
Herfried K. Wagner
Guest
Posts: n/a
 
      14th Jul 2003
Hello,

"Ben Dilts" <(E-Mail Removed)> schrieb:
> Using VB.NET, is there a way to determine if the Shift key
> is down (or the Control key, etc.)?


\\\
Imports System.Windows.Forms
..
..
..
MsgBox((Control.ModifierKeys And Keys.Shift) = Keys.Shift)
///

Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Determine shift from date/time stamp? =?Utf-8?B?TWFyaw==?= Microsoft Access VBA Modules 8 17th Jul 2006 12:58 PM
Formula to determine shift =?Utf-8?B?TGl6?= Microsoft Excel Worksheet Functions 4 15th Aug 2005 06:52 AM
How to determine SHIFT key state - NOT from eventhandler mdb Microsoft C# .NET 1 19th May 2005 05:11 PM
Determine Shift Key Press Todd Huttenstine Microsoft Excel Programming 4 21st May 2004 04:37 PM
Determine if Shift is down? Ben Dilts Microsoft Dot NET Framework 2 14th Jul 2003 09:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:52 PM.