0

Hey. I'm having a problem. In a form's constructor, I have:

this.KeyDown+=new KeyEventHandler(frmGScreen_KeyDown)

but the event handler does not invoke at all when I press a key on the keyboard. I know this because i have the code "txtOutput.Text="Event handler entered" as the first line of the handler, and nothing happens, and besides, the actions coded for specific keys do not execute.

I do have the form's KeyPreview property set to true. So this one truly stumps me. I just don't get it...

2
Contributors
3
Replies
4
Views
10 Years
Discussion Span
Last Post by dahwan
0

try:

this.KeyPress+=new KeyEventHandler(frmGScreen_KeyDown)

If it doesnt work, show me the rest of the program; as the error is not in that line.

0

I guess I should have marked this as solved because i did fix it quit a while ago....cant remember how though..

0

Wow, i didnt realise this thread was so old. Sorry to bring it up again, but i found this thread as i was searching for tutorials on google.
Do you have an IM adress?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.