J
Jarod_24
Finding out if Alt, Ctrl or Shift has been pressed is easy, but what to do
with the Win-key?
Example:
Dim strHotkey as String = "Win+Ctrl+NumPad0"
Dim hot_key As Keys = CType(New
KeysConverter().ConvertFromString(strHotkey), Keys)
'These work
If ((hot_key And Keys.Alt) <> 0) Then myHotKey2.Altkey = True
If ((hot_key And Keys.Control) <> 0) Then myHotKey2.ControlKey = True
If ((hot_key And Keys.Shift) <> 0) Then myHotKey2.ShiftKey = True
'These do not
If ((hot_key And Keys.LWin) <> 0) Then myHotKey2.WinKey = True
If ((hot_key And Keys.RWin) <> 0) Then myHotKey2.WinKey = True
I know it's because that the WinKey's dosent' have a Modifier-bitpattern
like the other key's but is there any other way to find out if the Win Key
is one of the Keys that have been pressed.
with the Win-key?
Example:
Dim strHotkey as String = "Win+Ctrl+NumPad0"
Dim hot_key As Keys = CType(New
KeysConverter().ConvertFromString(strHotkey), Keys)
'These work
If ((hot_key And Keys.Alt) <> 0) Then myHotKey2.Altkey = True
If ((hot_key And Keys.Control) <> 0) Then myHotKey2.ControlKey = True
If ((hot_key And Keys.Shift) <> 0) Then myHotKey2.ShiftKey = True
'These do not
If ((hot_key And Keys.LWin) <> 0) Then myHotKey2.WinKey = True
If ((hot_key And Keys.RWin) <> 0) Then myHotKey2.WinKey = True
I know it's because that the WinKey's dosent' have a Modifier-bitpattern
like the other key's but is there any other way to find out if the Win Key
is one of the Keys that have been pressed.