Key Press Event Never Get Fired!!

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?
 
M

Morten Wennevik

Hi Victor,

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

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

Top