How to catch KeyUp or KeyPress event in a modal window (ShowDialog)

  • Thread starter Thread starter bill
  • Start date Start date
B

bill

I hook up event handlers to KeyUp/KeyDown/KeyPress to a modal window.
Nothing works. It works for sure on the main form. Thanks.
 
Hi bill,

..>I hook up event handlers to KeyUp/KeyDown/KeyPress to a modal window.
Nothing works. It works for sure on the main form.

What don't work. Is it only for particular keys or they are not called for
any key.

Did you set form's KeyPreview property to *true*?

I wrote a simple test and it was working fine for modal and modalles forms.
 
Back
Top