473,387 Members | 2,436 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Form1_KeyDown

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
5 5056
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Chris LaJoie | last post by:
Our company has been developing a program in C# for some time now, and we haven't had any problems with it, but just last night something cropped up that has me, and everyone else, stumped. I...
4
by: genc ymeri | last post by:
Hi, I have a C# from and I'm trying to add some code in onKeyDown event. But it doesn't fire at all............ Any idea ? Thanks a lot.
13
by: Mathieu Chavoutier | last post by:
Hi. I want to use esc key to cancel operations (I also want to use C^z). But, in "cancel", there is no escape character, and no z. So, how can I do to use those key ? Thanks.
3
by: Peter S | last post by:
I have function : System::Void Form1_KeyDown(Object* sender, KeyEventArgs* e) but this: this->KeyDown += new KeyEventHandler(this, Form1_KeyDown); doesnt work.. how I can change it to run?...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.