Solved

KeyCode

Posted on 2000-04-18
6
377 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

831 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