Key event handling.

  • Thread starter Thread starter praneshrj
  • Start date Start date
P

praneshrj

Hi,

I am having a problem in trapping the KeyUp event in the Form. I have
the handler defined and it is assigned as the "delegate" for the KeyUp
Event. But the handler never gets called.

Has anybody faced this problem before. I am wondering if it the event
is suppressed. But I cannot see how.

Any info on this will be appreciated.

Thanks,
Pranesh.
 
Pranesh,

Do you have the KeyPreview property of the Form set to true?

Hope this helps.
 
Nicholas,

I hadnot set that to True. Now it works perfectly.

Thanks.
-Pranesh.
Pranesh,

Do you have the KeyPreview property of the Form set to true?

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi,

I am having a problem in trapping the KeyUp event in the Form. I have
the handler defined and it is assigned as the "delegate" for the KeyUp
Event. But the handler never gets called.

Has anybody faced this problem before. I am wondering if it the event
is suppressed. But I cannot see how.

Any info on this will be appreciated.

Thanks,
Pranesh.
 
Back
Top