![]() |
| ||
| Problem with keyboard control in C# Hello, Recently I needed to assign keyboard control to my program; so and I searched the Internet, I found many examples but it seems all have one little problem(or it's my mistake?): I use this test code: using System; Keyboard control works fine but not for all key: Enter, Up, Down, Right, Left -> these are not working.:( . I don't understand why, because these controls are defined in c# like the others. If you have an idea, please post it. Thanks :) |
| ||
| Re: Problem with keyboard control in C# What control currently has focus? Sometimes a control with focus can prevent some of these things working |
| ||
| Re: Problem with keyboard control in C# Thanks for reply. It has assigned 'button1_KeyDown' to the keydown property. 'button1' is focused. other keys work but those keys dont work. |
| ||
| Re: Problem with keyboard control in C# The button is eating your keys, if you remove the button the problem goes too If all you're using is the button to get the events setup, dont, use the forms direct. |
| ||
| Re: Problem with keyboard control in C# :) . LizR, you're right. The button ate my keys to access itself. THANKS! You solved my little annoying problem :) ! |
| ||
| Re: Problem with keyboard control in C# Do mark the this thread as solved then :) |
| All times are GMT -4. The time now is 12:11 am. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC