|
-
Feb 9th, 2000, 07:30 AM
#1
Thread Starter
Hyperactive Member
How do you check to see if someone is pressing multiple keys (i.e.-Alt+F4). Because I need to check and see if the user presses 'SHIFT + TAB' while inside a textbox.
------------------
Ryan
-
Feb 9th, 2000, 08:34 AM
#2
Lively Member
Use KeyDown event. See VB online help for details.
-
Feb 9th, 2000, 08:35 AM
#3
The Keydown Event passes a Shift Value which indicates wether SHIFT,CTRL or ALT is Pressed in Combination with the KeyCode Value, ie.
Code:
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyTab And (Shift And vbShiftMask) = vbShiftMask Then
Caption = "SHIFT + TAB"
End If
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
Certified AllExperts Expert
-
Feb 9th, 2000, 08:47 AM
#4
Thread Starter
Hyperactive Member
Ya know what though, for some reason I cannot get the KeyDown event to recognize the Tab key. I've used a break point at the beginning of the KeyDown event and it doesn't even go into the event code. I don't know why, everything I've read, says it should work, but it's not working.
------------------
Ryan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|