|
-
Dec 23rd, 2001, 12:33 AM
#1
Thread Starter
Lively Member
Tab key press
How can i detect TAB key hit?
thanks
-
Dec 23rd, 2001, 12:44 AM
#2
Will this do anything for you?
VB Code:
Option Explicit
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Const VK_TAB = &H9
Private Sub Form_Load()
Timer1.Interval = 50
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
If GetAsyncKeyState(VK_TAB) <> 0 Then
MsgBox "Tab pressed"
End If
End Sub
-
Dec 23rd, 2001, 12:48 AM
#3
Do you want to make something with a textbox ? Like when you press Tab it do not switch to an other control but just make space in the textbox?
-
Dec 23rd, 2001, 10:26 AM
#4
Thread Starter
Lively Member
Originally posted by MarkT
Will this do anything for you?
VB Code:
Option Explicit
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Const VK_TAB = &H9
Private Sub Form_Load()
Timer1.Interval = 50
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
If GetAsyncKeyState(VK_TAB) <> 0 Then
MsgBox "Tab pressed"
End If
End Sub
Thanks MarkT, it works for me !
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
|