Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / September 2004

Tip: Looking for answers? Try searching our database.

keyboard converter

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cwineman - 30 Sep 2004 16:16 GMT
I am working on a form that receives keyboard events. Upon an event you know
what key was pressed, and you know whether or not the ALT,CTRL, or SHIFT
keys were being held down.

I was wondering if there was a class that would figure out the difference
between say, a "B" versus "b"  or a "3" versus a "#" being pressed. It
wouldn't be that hard to do it myself, but I thought that .NET might already
have something.

There is a KeysConverter class and that might be what I am looking for. But
I couldn't figure out how to use it. The documentation was useless and a
Google search didn't help me out either.

Anyone know if KeysConverter is the class I want to use? Got any examples?

-cwineman
Daniel Carlsson - 30 Sep 2004 16:37 GMT
I believe KeysConverter is used to convert a Keys enum value to and from a
string value.
Its used by the graphical editors.

Dont know Im afraid, Im guessing you have to consume KeyPressed as well
which gives you a properly formated char, either that or just assume english
keyboard and handle the logic yourself.

You wouldnt happen to know how to tell if shift (and only shift) is being
pressed btw? I take it you can only tell from when other keys are being
pressed from the shift flag on keypress, but if not..

/Dan

> I am working on a form that receives keyboard events. Upon an event you know
> what key was pressed, and you know whether or not the ALT,CTRL, or SHIFT
[quoted text clipped - 12 lines]
>
> -cwineman

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
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



©2008 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.