By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 1,534 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Form1_KeyDown

P: n/a
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)
{

Nov 16 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Hi Yosi,

It may be that some other control is trapping the keys.
Set your form's KeyPreview property to true.

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #2

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

"Morten Wennevik" wrote:
Hi,

Hi Yosi,

It may be that some other control is trapping the keys.
Set your form's KeyPreview property to true.

--
Happy Coding!
Morten Wennevik [C# MVP]

Nov 16 '05 #3

P: n/a
On Sun, 28 Nov 2004 03:53:10 -0800, [Yosi]
<Yo**@discussions.microsoft.com> wrote:
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?

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #4

P: n/a
All other application is working , just this one. (arrow keys).

"Morten Wennevik" wrote:
On Sun, 28 Nov 2004 03:53:10 -0800, [Yosi]
<Yo**@discussions.microsoft.com> wrote:
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?

--
Happy Coding!
Morten Wennevik [C# MVP]

Nov 16 '05 #5

P: n/a
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.

--
Happy Coding!
Morten Wennevik [C# MVP]
Nov 16 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.