I would say do the following.
Set your form's Keypreview property to True.
In the form's Keydown event Add the following code
' add all keys here you want to block to this if statement with Or
If KeyCode = vbKeyF4 or KeyCode = vbKeyF5 Then
KeyCode = 0
Endif
this should Block it for you pretty good, however if you want a bit more
control than that, you can add the same code to the keydown even of the
controls themselves instead of in the form's code.
Stéphane Richard
Senior Software and Technology Supervisor
http://www.totalweb-inc.com
For all your hosting and related needs
"Niels Borg" <nb****@hotmail.com> wrote in message
news:3f***********************@dread16.news.tele.d k...
Hi,
I am building an app, where I would like to disable the standard windows
function keys. I.E. F4 which expands a a selected drop-down list.
Can anyone help me on that?
Many thanks
Niels Borg