473,569 Members | 2,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with OnKeyDown

Hi all.
I have a problem eith OnKeyDown
it work fine when on the form there are nothing, but when I am adding
toolbar it does not work properly, I receive Keys.Up event for 2 second time

Can anyone help me ?

thanks
Nov 16 '05 #1
3 2383
Hi,

When you have several controls on your form, it is not guranteed that the
key event is focused to the container FORM where you have the OnKeyDown
tracked..

Nirosh.

"news.microsoft .com" <ho************ ****@epygilab.a m> wrote in message
news:OS******** ******@TK2MSFTN GP09.phx.gbl...
Hi all.
I have a problem eith OnKeyDown
it work fine when on the form there are nothing, but when I am adding
toolbar it does not work properly, I receive Keys.Up event for 2 second time
Can anyone help me ?

thanks

Nov 16 '05 #2
and what can I do in that case to handle this event?

"Champika Nirosh" <te**@test.lk > wrote in message
news:eH******** *****@TK2MSFTNG P14.phx.gbl...
Hi,

When you have several controls on your form, it is not guranteed that the
key event is focused to the container FORM where you have the OnKeyDown
tracked..

Nirosh.

"news.microsoft .com" <ho************ ****@epygilab.a m> wrote in message
news:OS******** ******@TK2MSFTN GP09.phx.gbl...
Hi all.
I have a problem eith OnKeyDown
it work fine when on the form there are nothing, but when I am adding
toolbar it does not work properly, I receive Keys.Up event for 2 second

time

Can anyone help me ?

thanks


Nov 16 '05 #3
Elp
news.microsoft. com wrote:
and what can I do in that case to handle this event?


Override the WndProc function of your form and handle the WM_KEYDOWN message
(which value is 0x0100).
Nov 16 '05 #4

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

Similar topics

3
7388
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
9150
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);}, false); }
5
1920
by: Girish | last post by:
I have TWO submit buttons of type IMAGE on my asp form. This renders as <input type="image">. I need to be able to eble the ENTER button for both buttons. Yes, I know that for the input type image, the submit happens automatically to the server. Heres my problem: I have two event handlers for both these buttons as stated below: BUTTON...
5
3786
by: Roger Withnell | last post by:
I'm using the following code to start a function on key down. document.onkeydown = OnKeyDown; function OnKeyDown() { vKeyCode = event.keyCode; ..code... }
4
4986
by: Udi | last post by:
Hi All, MyRichEdit is derived from RichTextBox. I'm overriding OnKeyDown. I'm trying to handle the TAB key but without printing it in the edit box: protected override bool IsInputKey(Keys keyData) { switch (keyData) {
1
5739
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 // @namespace Devin Samarin // @description This automatcally selects the top result for your query. // @include *google.com/ig* //...
3
1612
rajiv07
by: rajiv07 | last post by:
<html> <head> <title><%=strTitle%></title> <script language="JavaScript"> <!-- var message="Sorry, that function is disabled."; function onKeyDown(e) { if (event.keyCode == 122) {
3
2550
by: gjain12 | last post by:
Hi all, I am using the following code to disable the ctrl+a/c/v/x keys. <html> <head> <script language="JavaScript" type="text/javascript"> function disableCtrlKeyCombination(e) { //list all CTRL + key combinations you want to disable
8
4257
by: Tony Johansson | last post by:
Hello! I wonder can somebody explain when is it suitable to use these methods OnKeyUp, OnKeyDown and OnKeyPress because these raise an event. These are located in class UserControl. If these raise an event how do I create an handler to catch these raised events. //Tony
0
7695
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7922
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7964
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6281
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1209
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
936
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.