Opening form with a functional key (1 Viewer)

aqif

Registered User.
Local time
Today, 15:40
Joined
Jul 9, 2001
Messages
158
Hi


In my form there is a button which open popup form for seeing the avalaible options. I m trying attach a function key to open that form...or any other key for that matter. I m aware or alt+some key...thing....so just want a single function key to be pressed to open a popup form.

Cheers!
Aqif
 

KDg

Registered User.
Local time
Today, 15:40
Joined
Oct 28, 1999
Messages
181
Hi aqif,

if you wanted to use F3 for example then set the KeyPreview event of the form to yes and on its KeyDown trap for the particular button that you are after. i believe that these are common to all keyboards, but i might only think that as i work in a corporate environment - ymmv. Just be carefull you don't use a button that's already spoken for


eg.
Code:
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = 114 Then ' F3 on my keyboard
        Command0_Click
    End If
End Sub

HTH,

Drew

[This message has been edited by KDg (edited 10-02-2001).]
 

aqif

Registered User.
Local time
Today, 15:40
Joined
Jul 9, 2001
Messages
158
Thanxx buddy
it worked flawlessly.....searched for list of KeyCodes in help but there the list was diffrent like for F3 it was 0x72...can u please mail me the list of other keycodes also


Thnxxxx again...cheers!
Aqif
 

Users who are viewing this thread

Top Bottom