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

MapVirtualKey doesn't distinguish between left and right keys onXP/2000

RL
Hi,

I have following function call in my C# program:

Keys virtualKey = (Keys)Win32Api.MapVirtualKey(0xe038,
3);

-Win32Api is my own wrapper around the MapVirtualKey API function.
-My current keyboard layout is Swiss German.
-0xe038 is the scancode for the Right Alt key
-The last parameter value 3 represents MAPVK_VSC_TO_VK_EX
Windows NT/2000/XP: uCode is a scan code and is translated into a
virtual-key code that distinguishes between
left- and right-hand keys. If there is no translation, the
function returns 0.

On Vista virtualKey returns Keys.RMenu which is correct

On XP/2000 it returns None.

Why is it behaving wrong on XP/2000?

Thanks for your help.

Reto

Nov 22 '07 #1
0 1098

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

Similar topics

0
by: Muki Rapp | last post by:
Hi! I am trying to implement in .Net the MapVirtualKey concept. In other words, I want to read a character from the keyborad and to type it on screen, accroding to: * The specail keys status...
1
by: John M | last post by:
Hi, In recently recieved some excellent advice which ebnabled me to make a form behave as a spreadsheet with respect to the down and up arrow keys. To develop this further I would like the right...
149
by: Christopher Benson-Manica | last post by:
(Followups set to comp.std.c. Apologies if the crosspost is unwelcome.) strchr() is to strrchr() as strstr() is to strrstr(), but strrstr() isn't part of the standard. Why not? --...
7
by: Seash | last post by:
Hi friends , here is the sample code private void txtbox_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { if(e.KeyChar == 13) //enter { txtbox2.Focus(); }
8
by: JackRazz | last post by:
Is it possible to create a hashtable that doesn't store the key? I have a very large hashtable and I just want it to store the HashCode and the Value (two Int16s). Thanks - JackRazz
3
by: eBob.com | last post by:
I'm trying to treat the Enter key in a textbox as the Tab key. Thanks to a post which Google came up with I have coded a technique using GetNextControl (see below). But it doesn't work. It seems...
9
by: raiden1985 | last post by:
Please take a look at my code.... Const WM_KEYDOWN As Integer = &H100 Const WM_SYSKEYDOWN As Integer = &H104 Const WM_KEYUP As Integer = &H101 Const WM_SYSKEYUP As Integer =...
1
by: lbelkova | last post by:
Hello, I've created a custom DataGridViewColumn. Everything work well, except for some reason the column doesn't accept some of the chars: "q", "." and "'". Did anybody have a similar problem?...
16
by: ImpactMan | last post by:
Need help to create an windows mobile application with a few buttons that when they are pressed/clicked they assign keys, like up, down, left, right. It is just like to create a "virtual d-pad",...
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:
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: 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: 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
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.