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

WM_KEYDOWN does not get arrow key messages

I have two situations:

1) a form with a picturebox on it
This picturebox does NOT gets WM_KEYDOWN messages if the key is an arrow
key. Works OK if Num Lock is on so those keys are numerals.

1)A form with a textbox on it
This textbox gets those WM_KEYDOWN messages.

Maybe the fact that its a picturebox is not significant. Maybe something
else is causing the problem.

Any info or helpful suggestions would be appreciated

Nov 16 '05 #1
2 4788
That is because of the way the controls manage input keys.
Before raising keydown event, it checks if the key is an input key.

So, override IsInputKey method as following :

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

Hope it helps.

Ludovic SOEUR.
" Just Me" <gr****@a-znet.com> a écrit dans le message de
news:eW*************@TK2MSFTNGP15.phx.gbl...
I have two situations:

1) a form with a picturebox on it
This picturebox does NOT gets WM_KEYDOWN messages if the key is an arrow
key. Works OK if Num Lock is on so those keys are numerals.

1)A form with a textbox on it
This textbox gets those WM_KEYDOWN messages.

Maybe the fact that its a picturebox is not significant. Maybe something
else is causing the problem.

Any info or helpful suggestions would be appreciated

Nov 16 '05 #2

"Ludovic SOEUR" <Lu***********@hotmail.com> wrote in message
news:ef*************@TK2MSFTNGP12.phx.gbl...
That is because of the way the controls manage input keys.
Before raising keydown event, it checks if the key is an input key.

So, override IsInputKey method as following :

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

Hope it helps.

Yes it did. Thanks


Nov 16 '05 #3

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

Similar topics

3
by: Ali Eghtebas | last post by:
Hi, I have 3 questions regarding the code below: 1) Why can't I trap the KEYDOWN while I can trap KEYUP? 2) Is it correct that I use Return True within the IF-Statement? (I've already read...
7
by: Todd Cary | last post by:
I inherited an application where the Flyout works in Firefox but not in IE. My JavaScript background is sparse, so I am not sure how to approach the problem. Any suggestions are welcomed! The...
0
by: Michael Grabelkovsky | last post by:
I call ActiveX from my C# program. ActiveX is 3D navigator that is successfully works from Browser. The problem: if I call ActiveX from C#, I can't transmit keyboard management to it ( WM_KEYDOWN...
2
by: Just Me | last post by:
I do not get WM_KEYDOWN messages for arrow keys presses in my overridden WndProc for a picturebox control. Something must be eating them - anyone familiar with what's going on? Thanks
7
by: JohnR | last post by:
Couldn't find it in MSDN. Does anybody have a listing of the message constants that would be received in my application.addmessagefilter routine in VB.net? They are referred to all over MSDN but...
11
by: Rlrcstr | last post by:
How can you detect when an arrow key gets pressed? Doesn't seem to trigger a KeyPress or KeyDown event. Thanks. Jerry
4
by: Nathan Baker | last post by:
Hey, I am trying to subclass a button to create a control similar to the Firefox/IE dropdown button. My first step is to draw the 'down arrow' on the button. I overrided the OnPaint method...
2
by: webdeveloper | last post by:
sorry about that, This is the event handling element: <div id="menu"> <ul> <li>.... <li><a href="javascript:expand_menu(document.getElementById('extend'))" id="extend">Text <img src=""...
4
by: beary | last post by:
Hi Being tested using FF 3 on WAMP server. I have spent a number of hours trying to figure this out myself. I have a html form using table cells and had a request to enable the arrow keys on a...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...

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.