Deactivating keys

G

Gregory

I am trying to turn off certain keyboard keys and can't find the listing for the codes for the keys. VB has a keycode function that gives an ascii listing of the key values but I can't seem to get it to work. I am trying to deactivate the arrow keys

Any help would be greatly appreciated...
 
D

Dan Artuso

Hi,
If you want the KeyCodes for the arrow keys, put this in any form's
KeyDown event (make sure KeyPreview is set to yes) and then press the keys :)

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
MsgBox KeyCode
End Sub

--
HTH
Dan Artuso, Access MVP


Gregory said:
I am trying to turn off certain keyboard keys and can't find the listing for the codes for the keys. VB has a keycode function
that gives an ascii listing of the key values but I can't seem to get it to work. I am trying to deactivate the arrow keys.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top