First add this under public class:
Code:
Private Declare Function GetAsyncKeyState Lib "user32.dll" (ByVal vKey As System.Int16) As Int16 'so its x64 bit compatible
Then under a timer which should start at form1 load put:
Code:
Dim StartHotkey As Integer
StartHotkey = GetAsyncKeyState(120)
If StartHotkey <> 0 Then
'Your code here
end if
BTW thats the hotkey F9 heres a list of hotkeys and their correspnding #'s
112 F1 key
113 F2 key
114 F3 key
115 F4 key
116 F5 key
117 F6 key
118 F7 key
119 F8 key
120 F9 key
121 F10 key
122 F11 key
123 F12 key
124 F13 key
125 F14 key
126 F15 key
127 F16 key
the # goes to the hotkey so 127 is F16