Solved

Receiving keystrokes as soon as a program is launched?

Posted on 2004-09-06
4
261 Views
Last Modified: 2010-04-15
I have been given the task of optimizing the productivity done by the data entry people. I need to write a few small utilities. The important thing about this task is that the keystrokes needed to accomplish a task must be minimized. When my utility is launched the user needs to be able to start typing data. After the program is launched it has focus, but for some reason I do not receive KeyPress Events in my form. What must I do to fix this?

Thank you for your time,
Arrummzen
0
Comment
Question by:Arrummzen
4 Comments
 
LVL 20

Expert Comment

by:TheAvenger
ID: 11988250
What controls do you have on the form? Which of them has the focus? If a text box has a focus, the form will not receive the KeyPress events, but the TextBox will handle them.
0
 
LVL 18

Expert Comment

by:armoghan
ID: 11988258
0
 
LVL 4

Accepted Solution

by:
somnatic earned 250 total points
ID: 11988410
on your form .. set the property KeyPreview to true ...

you should then receive all keypresses
0
 
LVL 1

Author Comment

by:Arrummzen
ID: 11991343
Thanks. Thats what I needed.

Thank you for your time,
Arrummzen
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

706 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now