I have created xml file in which I have added all keys as nodes and its respective virtual key codes as a value. I am fetching those values and storing it in string format. I need output as: When I press key 0 its corresponding value is 0x30 But my PressKey function uses Keybd_event which takes virtual key code as an argument.
public bool Presskey(byte buttonVirtualKey)
{
keybd_event(buttonVirtualKey, 0, 0, 0);
}
I need to convert the string formatted virtual key code("0x30") to byte value(0x30).
Any type of help would be appreciated.