Solved

String "F5" to System.Windows.Forms.Keys.F5 ?

Posted on 2007-03-31
4
923 Views
Last Modified: 2008-01-09
Hello

How can I convert a string "F5" to System.Windows.Forms.Keys.F5 ?

For every string values that System.Windows.Forms.Keys is supporting?

Thanks

Sven
0
Comment
Question by:Ruttensoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 18829501
try this:
[Enum].Parse(GetType(System.Windows.Forms.Keys), "F5", True))
0
 

Author Comment

by:Ruttensoft
ID: 18829517
Ulalala what a masterpiece of code!

Thanks a lot, exactly what I wanted...
0
 
LVL 85

Expert Comment

by:Mike Tomlinson
ID: 18829560
Just beware of the "quirky" vaues such as the numbers 1 thru 9.

They are "D1", "D2", etc...

Not very intuitive in my opinion!

0
 

Author Comment

by:Ruttensoft
ID: 18829567
Thanks Idle, just had that problem :-)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question