Re: Converting string to Keys enum value? by Shiva
Shiva
Thu Sep 09 11:46:50 CDT 2004
Here is one option (in VB .NET):
[Enum].Parse(GetType(System.Windows.Forms.Keys), "PageUp", False)
If the string doesn't exist in the enumeration, an exception will be raised.
"Arkion" <nospam@nowhere.com> wrote in message
news:rr01k09ll3q12ocqrgesg6q4uf2nog2mme@4ax.com...
Hello!
I'm using XML serialization to store key assignments and came across a
little problem. Is it possible to convert a string, eg. "PageUp" to
equivalent System.Windows.Forms.Keys enumeration value?