PC Review


Reply
Thread Tools Rate Thread

Detecting Keyboard keys

 
 
Elmo Watson
Guest
Posts: n/a
 
      21st Nov 2006
I can use Asc(e.KeyChar) to find out the keystrokes in the regular part of
the keyboard.

Is there any way to detect ASC value of either the F keys or the arrow keys?


 
Reply With Quote
 
 
 
 
Josip Medved
Guest
Posts: n/a
 
      21st Nov 2006
> I can use Asc(e.KeyChar) to find out the keystrokes in the regular part of
> the keyboard.
> Is there any way to detect ASC value of either the F keys or the arrow keys?


For finding keystrokes I would recoment KeyDown/KeyUp events with
e.KeyData.


E.g.

switch(e.KeyData) {
case Keys.Left: MessageBox.Show("Left");
case Keys.F2: MessageBox.Show("F2");
}

Select Case e.KeyData
Case Keys.Left: MessageBox.Show("Left")
Case Keys.F2: MessageBox.Show("F2")
End Select

--
Greetings,
Josip Medved
http://www.jmedved.com

 
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
Detecting Up, down, right, left arrow keys, how? Robert Dufour Microsoft VB .NET 2 3rd Aug 2007 11:02 PM
How to get keys that you press to look like the keyboard keys? =?Utf-8?B?YWplc3NlcGg=?= Microsoft Word Document Management 1 3rd Aug 2007 04:58 AM
Detecting keyboard popup Peter Morris [Droopy eyes software] Microsoft Dot NET Compact Framework 3 30th Mar 2006 09:41 PM
Detecting keys in Pocket PC Game. =?Utf-8?B?Sm9uYXMgRm9sbGVzw7g=?= Microsoft Dot NET Compact Framework 3 28th Apr 2004 09:32 PM
Detecting arrow keys Nathan Microsoft VB .NET 6 19th Dec 2003 01:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:45 AM.