Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 385
  • Last Modified:

KeyCode

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?
0
dosyl
Asked:
dosyl
  • 3
  • 2
1 Solution
 
Sage020999Commented:
Are you talking about monitoring which keys are pressed in your app?  You can turn on the keypreview for the form.  
0
 
dosylAuthor Commented:
I want to verify for example:
If the user press Delete, i will delete the info. on the form. Etc.
0
 
dosylAuthor Commented:
Info.= Data in txtboxes, data in the recordset etc.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Sage020999Commented:
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.
0
 
korkyCommented:
Use the GetAsyncKeyState() API


0
 
dosylAuthor Commented:
I forgot this property.
Thank you.
0

Featured Post

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.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now