473,405 Members | 2,141 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,405 software developers and data experts.

keyboard capture

I've written a simple application. It consists of main window, menu and a
label. I added event handler to the main form (KeyDown), so when I push a
key on the keyboard, then it's key code should be displayed using a label
(label.Text = e.KeyCode) but when I press
left arrow, up arrow etc, the main menu popups and KeyDown event is not
handled.
What should I do ?
PS. I use .NetFramework 2.0 Beta2. In .NetFramework 1.1 there wasn't such
problem.

Emil.
Nov 17 '05 #1
2 1906
Add this to your form and try:

protected override bool IsInputKey(Keys keyData)
{
return true;
}

HTH
-vj

"Emil" <em******@op.pl> wrote in message
news:d5**********@nemesis.news.tpi.pl...
I've written a simple application. It consists of main window, menu and a
label. I added event handler to the main form (KeyDown), so when I push a
key on the keyboard, then it's key code should be displayed using a label
(label.Text = e.KeyCode) but when I press
left arrow, up arrow etc, the main menu popups and KeyDown event is not
handled.
What should I do ?
PS. I use .NetFramework 2.0 Beta2. In .NetFramework 1.1 there wasn't such
problem.

Emil.

Nov 17 '05 #2
"Emil" <em******@op.pl> wrote in message
news:d5**********@nemesis.news.tpi.pl...
What should I do ?


Did my suggestion to you in that other post yesterday not work? If not,
what is wrong?

-- Alan
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Juha-markku Liikala | last post by:
Hi! I've just started to learn PHP, so this may be a dumb quiestion, but I'll ask it anyway... Is it possible to create a photoalbum (or make use of such) with PHP, where I could navigete...
0
by: chewie | last post by:
Does anyone know how to capture keyboard scan codes using C#? Thanks
0
by: John | last post by:
I used GetMessage() to capture the VK_ Message, but false. how to capture the Keyboard message?
4
by: teddysnips | last post by:
I posted yesterday about a project I'm involved in to build a login application using a barcode scanner. I've solved most of the problems, but one remains. The client want to disable keyboard...
5
by: Lumpierbritches | last post by:
Thank you in advance for any and all assistance. Is there a way in VB.Net to call the ASCII equivilalent to each corresponding keypress? Similar to VB6, using KeyAscii? If KeyAscii <= 26 Then...
0
by: Gamey | last post by:
I have an application that NEEDS (don't ask) to handle additional mouse and keyboard processing during DoDragDrop. Normally, DoDragDrop kindly squashes all keyboard and mouse events. Alternate,...
2
by: Justin | last post by:
So I have a keyboard hook that I have implemeted into my c# app. I need to not allow any hotkey actions to be performed when my app is opened. I can capture the key events and handle them if I want...
5
jamesd0142
by: jamesd0142 | last post by:
hi guys i want to create a form which runs in the background which is not visible... so far so good... now... how can i get it to capture all keyboard input, so that i can say if f10 is pressed...
9
by: Peter Blues | last post by:
I'm trying to write from keyboard input to a txt file. I don't understand why the while loop below doesn't achieve this. I.. 1: open the file for writing through FILE pointer outstream 2: I get...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.