Is there a way to find the KeyCode when we don't know where is the focus. I don't want to use SetFocus. I just want to catch the KeyCode Anytime.
If it is possible without Api i'd like?
Who is Participating?

Improve company productivity with a Business Account.Sign Up

Sage020999Connect With a Mentor Commented:
Ok,  turn on your keypreview for the form.  This will send the keypreview property of the form.  This will force the keys to affect the form and not the controls on the form.  You can then validate the keys in the Keyup or Keydown events to involk the differant responses you wish to create.
Are you talking about monitoring which keys are pressed in your app?  You can turn on the keypreview for the form.  
dosylAuthor Commented:
I want to verify for example:
If the user press Delete, i will delete the info. on the form. Etc.
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

dosylAuthor Commented:
Info.= Data in txtboxes, data in the recordset etc.
Use the GetAsyncKeyState() API

dosylAuthor Commented:
I forgot this property.
Thank you.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.