Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Win API / March 2008



Tip: Looking for answers? Try searching our database.

ASCII code from RawInput

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Phil Stapleton - 17 Mar 2008 13:28 GMT
I use RawInput to get the key pressed on one of several keyboards attached to
the machine.  It provides a RawInput Code that indicates which key was
pressed but this is not the ASCII code for the key (RawInput codes for the
aphameric keys do seem to be the uppercase ASCII code - but those for
"special characters"  are not.)

I can manage the shift, alt and ctl keys OK, but the ASCII meaning of a key
is dependent on the keyboard in use. For example, if I shift-press the 4th
key on the top row of my English keyboard I get the UK currency symbol £. If
you press the same key on a US keyboard, it generates the same RawInput code
(xD3) but it means # (or possibly cent - I forget which)
Somewhere in Windows there is a table that converts RawInput codes to ASCII
depending on the keyboard in use - can anyone tell me where and how to use it
from VB.net?
Bob Butler - 17 Mar 2008 13:51 GMT
>  can anyone tell me where and how to use it
> from VB.net?

not here

Signature

You need to ask in a newsgroup with "dotnet" in the name.  This group is for
VB 6.0 and earlier and does not include VB.Net or VB 200x.

Jim Mack - 17 Mar 2008 13:52 GMT
Since this isn't a .net newsgroup -- those all have "dotnet" or
"vsnet" in their names -- it isn't the right place to ask your
question. For best results post in an appropriate group.

--
   Jim Mack
   MicroDexterity Inc
   www.microdexterity.com

> I use RawInput to get the key pressed on one of several keyboards
> attached to the machine.  It provides a RawInput Code that
[quoted text clipped - 11 lines]
> keyboard in use - can anyone tell me where and how to use it from
> VB.net?
Thorsten Albers - 17 Mar 2008 16:20 GMT
Phil Stapleton <Phil.Stapleton@discussions.microsoft.com> schrieb im
Beitrag <1ED9B1DA-2D29-48A1-8F97-7DD28902995B@microsoft.com>...
> I use RawInput to get the key pressed on one of several keyboards attached to
> the machine.  It provides a RawInput Code that indicates which key was
[quoted text clipped - 4 lines]
> is dependent on the keyboard in use. For example, if I shift-press the 4th
> key on the top row of my English keyboard I get the UK currency symbol
£. If
> you press the same key on a US keyboard, it generates the same RawInput code
> (xD3) but it means # (or possibly cent - I forget which)
> Somewhere in Windows there is a table that converts RawInput codes to ASCII
> depending on the keyboard in use

Raw keyboard data usually are scan codes. Often beside the scan code the
virtual key code is provided. To map scan codes to virtual key codes, etc.
and vice-versa use MapVirtualKey()/MapVirtualKey(Ex).

> can anyone tell me where and how to use it from VB.net?

See the other answers in this thread!

Signature

----------------------------------------------------------------------
THORSTEN ALBERS                       Universität Freiburg
                                               albers@
                                                      uni-freiburg.de
----------------------------------------------------------------------

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.