Receiving keystrokes as soon as a program is launched?

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,
Who is Participating?
somnaticConnect With a Mentor Commented:
on your form .. set the property KeyPreview to true ...

you should then receive all keypresses
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.
ArrummzenAuthor Commented:
Thanks. Thats what I needed.

Thank you for your time,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.