Form1_KeyDown

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
I add to my application the Form1_KeyDown event, But I don't go inside
this function when press on the arrow keys,Any one have any Idea why it
happins,

Form1_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e)
{
 
Hi Yosi,

It may be that some other control is trapping the keys.
Set your form's KeyPreview property to true.
 
Hi,
The form's KeyPreview property is true. Is there any chance this happen
because I working in a LapTop?

:
Hi,
 
Hi,
The form's KeyPreview property is true. Is there any chance this
happen
because I working in a LapTop?

That would be odd.
On a blank form can you trap the arrow keys at all in keydown/keyup or
keypress?
Are the keys working? Using a multiline textbox, do they move the cursor
around?
 
It looks like something is trapping your keys somewhere. I can't really
say what, but you might want to look for complicated controls, third party
controls, controls within other controls etc.

Try to rebuild a blank form using the same controls with no code. If you
can recreate the entire form and you still can get the arrow keys in the
new form the problem is within the code itself.
 
Back
Top