|
-
October 22nd, 2001, 11:04 PM
#1
Function Keys
Hello gurus,
I have a MDI form, which contains lot of child forms. For example, in one form, I would like to make use of function keys, F2-Save, F3-Open that way. In different forms, different keys are used. I do not anything abt this.
Any help is greately appreciated.
Regards,
Shivakumar G.M.
-
October 23rd, 2001, 02:01 AM
#2
Re: Function Keys
You can use the KeyDown event of the child forms. Then you can use the KeyCOde to check what key was pressed.
private Sub Form_KeyDown(KeyCode as Integer, Shift as Integer)
Select Case KeyCode
Case vbKeyF2
MsgBox "You pressed F2"
Case vbKeyF3
MsgBox "You pressed F3"
Case vbKeyF4
MsgBox "You pressed F4"
End Select
End Sub
Tom Cannaerts
[email protected]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning -- Rich Cook
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
|