473,387 Members | 1,603 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.

Handke keypress - keydown event Label Control

Is there an easy way to capture the keypress - keydown events from a LABEL
control ?
Standard the control doesn't handle these events.
The label control inherits from the control class , and this class has the
keypress - keydown event handlers. So i believe this must be possible ?

k/Regards,

Nov 15 '05 #1
3 4134
On Mon, 10 Nov 2003 12:41:44 +0100, Peter Verburgh wrote:
Is there an easy way to capture the keypress - keydown events from a LABEL
control ?
Standard the control doesn't handle these events.
The label control inherits from the control class , and this class has the
keypress - keydown event handlers. So i believe this must be possible ?

k/Regards,


override COntrol.ProcessDialogKey()
--
Roy Osherove
weblog: http://www.iserializable.com
Nov 15 '05 #2
It doens't work,

i've a Custom label control that inherit
public class ClsCMPLabel : System.Windows.Forms.Label

in this inherited class i want to capture the keyDown & Keypress events .

Could someone give me a example howto do this ?

greetings,

PeteR.

"Roy Osherove" <ro**@iserializable.com> schreef in bericht
news:1w*******************************@40tude.net. ..
On Mon, 10 Nov 2003 12:41:44 +0100, Peter Verburgh wrote:
Is there an easy way to capture the keypress - keydown events from a LABEL control ?
Standard the control doesn't handle these events.
The label control inherits from the control class , and this class has the keypress - keydown event handlers. So i believe this must be possible ?

k/Regards,


override COntrol.ProcessDialogKey()
--
Roy Osherove
weblog: http://www.iserializable.com

Nov 15 '05 #3
Ok , thx , i've found it

"Peter Verburgh" <pe*****@skynet.be> schreef in bericht
news:3f**********************@reader1.news.skynet. be...
It doens't work,

i've a Custom label control that inherit
public class ClsCMPLabel : System.Windows.Forms.Label

in this inherited class i want to capture the keyDown & Keypress events .

Could someone give me a example howto do this ?

greetings,

PeteR.

"Roy Osherove" <ro**@iserializable.com> schreef in bericht
news:1w*******************************@40tude.net. ..
On Mon, 10 Nov 2003 12:41:44 +0100, Peter Verburgh wrote:
Is there an easy way to capture the keypress - keydown events from a LABEL control ?
Standard the control doesn't handle these events.
The label control inherits from the control class , and this class has the keypress - keydown event handlers. So i believe this must be possible ?
k/Regards,


override COntrol.ProcessDialogKey()
--
Roy Osherove
weblog: http://www.iserializable.com


Nov 15 '05 #4

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

Similar topics

12
by: Trevor Fairchild | last post by:
I'm writing a program that is designed for quick navigation using specific buttons on the keyboard. In doing this, I have added a KeyPress event for every control on the form to intercept the key...
4
by: phil_gg04 | last post by:
Dear Javascript Experts, I'm currently implementing Anyterm, a terminal emulator on a web page. It consists of an Apache module, some XmlHTTP and a bit of Javascript. The idea is to give you...
7
by: meh | last post by:
This should wotk I think but its not trapping the Insert or Delete key??? Do I not have this written correctly? if (e.KeyCode == Keys.Insert) { MessageBox.Show("Pressed " + e.KeyCode); if...
3
by: Keith Smith | last post by:
Whenever a Keydown EventHandler is processed the computer never continues on to process the KeyPress EventHandler. Is there a way to stop this? My goal is to be able to detect these keys from...
1
by: Rene | last post by:
Hi, I am running is some problems with the KeyPreview and KeyPress events. The KeyPress event is only triggered when there this an focusable control on the form. When all controls are disabled...
15
by: Adam J. Schaff | last post by:
I have noticed that if a user closes a form via pressing return (either while the OK button has focus or if AcceptButton is set to OK for the form) then the "ENTER" keypress event fires ON THE...
3
by: Just Me | last post by:
I noticed that I don't get KeyDown nor KetPress events if NumLock is not on. I can probably find a workaround but it would be nice to know what the rules are. Can anyone tell me when KeyPress...
1
by: windy | last post by:
What's the difference between Keypress and KeyDown event? looks like some key cannot be handled by both event. Can anyone list out the details and their usage for best pratice?
2
by: Tony Johansson | last post by:
Hello! I have created a Control that consist of a label and a textbox.I have called this class ctlLabelTextbox. public partial class ctlLabelTextbox : UserControl { .... } The class that I...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...

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.