What are the key codes[VB6]

April 18, 2011 at 05:36:25
Specs: Windows Vista
What are the key codes in Visual Basic 6?
Like this one, it is enter key.
If KeyAscii = 13 Then Label5_Click
How about F1,F2,F3,etc?
Does anybody knows?

See More: What are the key codes[VB6]

Report •

April 18, 2011 at 09:21:35
KeyAscii wont work for the Function keys becasue there is no ASCII code for function keys, only alp-numerical key and a few control keys like Enter, Tab and Back Space have ASCII codes. Basically anything you would have found on a mechanical typewriter.

To trap the function keys you use the KeyDown event. Put a break point in the KeyDown event. Press the appropriate key and read the value of KeyCode


Report •

April 19, 2011 at 00:51:52
Thanks guys

Report •

Related Solutions

Ask Question