Solved

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

Posted on 2007-03-31
4
927 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 86

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

710 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