|
-
Nov 13th, 2005, 02:43 PM
#8
Re: VB6 - Using the KeyDown Event
 Originally Posted by paralinx
Works for me. Did you try it?
by the way I forgot one thing:
VB Code:
Dim CTRL_1 As Boolean
Dim CTRL_2 As Boolean
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
On Error Resume Next
Select Case KeyCode
Case vbKeyControl
CTRL_1 = True
Case vbKeyF
CTRL_2 = True
End Select
If CTRL_1 And CTRL_2 Then
MsgBox "Control F"
CTRL_1 = False
CTRL_2 = False
End If
End Sub
paralinx,
this is not the perfect solution since CTRL+F means press F while keeping CTRL pressed. this will also work for:
1 - Pressing F after CTRL pressed n released
2 - Pressing CTRL after F pressed n released
3 - F + CTRL.
AFAIK, the only way to for this purpose is Sendkeys. though i may be wrong. there may exists some other methods.
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
|