Solved

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

Posted on 2007-03-31
4
913 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
  • 2
4 Comments
 
LVL 142

Accepted Solution

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

Author Comment

by:Ruttensoft
Comment Utility
Ulalala what a masterpiece of code!

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

Expert Comment

by:Mike Tomlinson
Comment Utility
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
Comment Utility
Thanks Idle, just had that problem :-)
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now