How To Use GetKeyState() to Check If the TAB Key Was Pressed (277916)
The information in this article applies to:
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q277916 SUMMARY
When you press the TAB key while the focus is on a control, the focus goes to the next control in the TAB order, and the KeyPress, KeyUp, and KeyDown events of the original control do not fire. As a result, you cannot use these events to trap the TAB key. However, you can use the GetKeyState function to check if the TAB key was pressed.
Modification Type: | Minor | Last Reviewed: | 7/13/2004 |
---|
Keywords: | kbAPI kbCodeSnippet kbhowto KB277916 |
---|
|