473,411 Members | 1,998 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,411 software developers and data experts.

Keyboard capture problem

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). It works fine with "A", "B" etc. 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
1 1519
"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). It works fine with "A", "B" etc. but when I
press left arrow, up arrow etc, the main menu popups and KeyDown event is
not handled.
What should I do ?


Have a look at the virtual function ProcessCmdKey() that all WinForms
inherit. You can get at the keyboard keys at a lower level than the
keydown event.

-- Alan
Nov 17 '05 #2

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

Similar topics

2
by: Patricio Stegmann | last post by:
Hello, I'm trying to capture all keyboard events from some different web page layouts: framesets with different stuff, like flash or whatever ! The problem I am getting is that only focused...
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...
2
by: hans.duedal | last post by:
The Gecko DOM reference gave me the idea that an onscreen keyboard I was doing should use Key Events, so the user may for instance place a letter anywhere, and such. While this can be handled using...
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...
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...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.