advice on trap key strokes on form

  • Thread starter Thread starter Ricky A.
  • Start date Start date
R

Ricky A.

I have a form in which I interact with via the FORM_KeyDown event, I trap
for key strokes, and I have functionality run that correspond to a certain
key. I have keypreview set to true. But the issue lies in when I hit the
enter key and the FORM_KeyDown event does nit fire for any of my other keys
in which I trap for. I tried setting the focus back to the form and even
tried setting focus to another control, but to no avail. Any ideas?

For what it's worth I also have a label at the top of my form showing the
time of day real time, by using the OnTimer event and setting Time Interval
property accordingly, just thought I would be thorough.

Rick

Thanks.
 
Ricky A. said:
I have a form in which I interact with via the FORM_KeyDown event, I trap
for key strokes, and I have functionality run that correspond to a certain
key. I have keypreview set to true. But the issue lies in when I hit the
enter key and the FORM_KeyDown event does nit fire for any of my other keys
in which I trap for. I tried setting the focus back to the form and even
tried setting focus to another control, but to no avail. Any ideas?

For what it's worth I also have a label at the top of my form showing the
time of day real time, by using the OnTimer event and setting Time Interval
property accordingly, just thought I would be thorough.

Rick

Thanks.

I don't understand, are you saying that your KeyDown event procedure runs
when the Enter key is pressed, but not any other key?

Incindentally, why do you need the time showing on your form? I generally
find that Windows tends to show the time in the bottom right corner of the
screen!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top