Key Press Event Never Get Fired!!

  • Thread starter Thread starter Victor
  • Start date Start date
V

Victor

Hi
I have a very strange problem about my Key Press event never get fired in
the VS2005.
I have a parent form and a user control. In my user control, I add two text
box. I also set two hot key for this two textbox. What I want to do is when
the user press the hot key(eg, Alt+E) then the specific textbox will get the
focus.
But my problem this does not work at all, I have tried the keypress event ,
and also tried to overrided the onKeyPress event for both my user control
and my parent form.

Can anyone give me some info what is going on here?
 
Hi Victor,

Try setting KeyPreview = true for the parent form, or if all fails,
override PreProcessMessage.
 
Back
Top