Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Trapping Function Keys

Posted on 1998-06-05
2
Medium Priority
?
160 Views
Last Modified: 2010-04-06
I have a Edit TEdit, used for a bar code scanner.  In the code, after I scan a bar code, I do a TEdit.SetFocus, to keep the cursor on this field so I can scan another bar code label.  This works fine with one exception.  I can't tell it I'm done.  I would like to be able to hit the 'F4' key to say I'm done with scanning, let me move to the next field.  The only problem is that I'm using the 'OnKeyPress' event.  It doesn't recognize function keys.

How do I get the OnKeyPress to accept function keys?
Thanks
0
Comment
Question by:gspears060598
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 1

Accepted Solution

by:
Greedy earned 200 total points
ID: 1350899
use the onKeyDown and look for Key = VK_F4
0
 
LVL 1

Expert Comment

by:Greedy
ID: 1350900
You might also want to know that the form has a property called KeyPreview.  If you set this to true you can have the Form look at the keyboard events first...might come in handy if you only want to write one event handler.
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

730 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