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

In OnKeyDown how do I make the character ignored?



I believe in the KeyDown event if I set e.Handled = True the character is
ignored and none of the other keyboard events or overrides will be called.
Is that true?

If in OnKeyDown I want to do the equivalent of setting e.Handled = True in
the KeyDown event, how do I do that?
Thanks in advance for any info

Nov 21 '05 #1
2 1319
If you do not delagate to MyBase.KeyDown(e) the key press will not be seen by
the base class and therefore ignored.

"**Developer**" wrote:


I believe in the KeyDown event if I set e.Handled = True the character is
ignored and none of the other keyboard events or overrides will be called.
Is that true?

If in OnKeyDown I want to do the equivalent of setting e.Handled = True in
the KeyDown event, how do I do that?
Thanks in advance for any info

Nov 21 '05 #2
thanks

"TrtnJohn" <Tr******@discussions.microsoft.com> wrote in message
news:E4**********************************@microsof t.com...
If you do not delagate to MyBase.KeyDown(e) the key press will not be seen
by
the base class and therefore ignored.

"**Developer**" wrote:


I believe in the KeyDown event if I set e.Handled = True the character is
ignored and none of the other keyboard events or overrides will be
called.
Is that true?

If in OnKeyDown I want to do the equivalent of setting e.Handled = True
in
the KeyDown event, how do I do that?
Thanks in advance for any info

Nov 21 '05 #3

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

Similar topics

1
by: George Hester | last post by:
This element is the only disabled=false element on the form: <HEAD> .... <SCRIPT type="text/javascript"> <!-- Begin function ValidateKey(e); e = event || window.event; var key; var skey;
6
by: Z | last post by:
I have sub-classed the TextBox. In its OnKeyDown event I can intercept key strokes, examine them, etc. When I get a certain keycode (e.g., 'A') I want to change it to another unicode key from a...
4
by: Andrew DeFaria | last post by:
I'm trying to use the onKeyDown event on a text field. I intersept the keystroke, interpret it and then do certain actions based on certain keys stuck. If a special key is stuck I replace the value...
1
by: Rob | last post by:
I have a date text box (input type = text) in an ASP.NET/Javascript environment. I wanted to force the users to enter dates in a "__/__/____", "dd/mm/yyyy" or similar format. The textbox needs to...
3
by: euler | last post by:
why did the keydown event not fire in this simple example? <HTML> <HEAD><title>keydown_div</title> <script type="text/javascript"> function keydown() { alert("keydown"); } </script>
10
by: b.dam | last post by:
I'm trying the following: function grid() { this._el = document.createElement("TABLE"); var self = this; document.addEventListener("onkeydown", function(event) {self.gridKeyDown(event);},...
4
by: Martin John Brindle | last post by:
I'm facing a problem where if I press a key in the <body> element ,of a dhtml page, the event is actioned before the actual key has been added to the document. In essence, I'm aiming to capture...
5
by: Dave Henson | last post by:
Hi I am checking a site for accessibility and Dreamweaver suggests making sure that the menu is accessible via keyboard as well as mouse (i.e device-independent). A question has arisen which is...
1
eboyjr14
by: eboyjr14 | last post by:
I have this UserScript for Grease monkey. but I can't get the onleydown event to fire in FIREFOX only. I've looked everywhere! // ==UserScript== // @name iGoogle Suggest //...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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.