Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Receiving keystrokes as soon as a program is launched?

Posted on 2004-09-06
4
Medium Priority
?
271 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
[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
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 4

Accepted Solution

by:
somnatic earned 1000 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
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…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

650 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