Solved

KeyCode

Posted on 2000-04-18
6
379 Views
Last Modified: 2012-05-04
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
Comment
Question by:dosyl
  • 3
  • 2
6 Comments
 
LVL 2

Expert Comment

by:Sage020999
ID: 2728419
Are you talking about monitoring which keys are pressed in your app?  You can turn on the keypreview for the form.  
0
 
LVL 1

Author Comment

by:dosyl
ID: 2728560
I want to verify for example:
If the user press Delete, i will delete the info. on the form. Etc.
0
 
LVL 1

Author Comment

by:dosyl
ID: 2728567
Info.= Data in txtboxes, data in the recordset etc.
0
Industry Leaders: 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!

 
LVL 2

Accepted Solution

by:
Sage020999 earned 10 total points
ID: 2728604
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
 

Expert Comment

by:korky
ID: 2730719
Use the GetAsyncKeyState() API


0
 
LVL 1

Author Comment

by:dosyl
ID: 2730821
I forgot this property.
Thank you.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question