Help please [c# windowsforms hotkeys]
err
im trying to add another hotkey...... F12 but im having trouble i dunno what f12's number is like f11 is
what does F12 equal? 0x "here?"
Code:
[DllImport("user32.dll", SetLastError = true)]
public static extern bool RegisterHotKey(
IntPtr hWnd,
int id,
KeyModifiers fsModifiers,
Keys vk
);
[DllImport("user32.dll", SetLastError = true)]
public static extern bool UnregisterHotKey(
IntPtr hWnd,
int id);
const int F11 = 0x0312;
protected override void WndProc(ref Message message)
{
if (message.Msg == F11)
{
timer1.Enabled = true;
}
base.WndProc(ref message);
}
public enum KeyModifiers //enum to call 3rd parameter of RegisterHotKey easily
{
None = 0,
Alt = 1,
Control = 2,
Shift = 4,
Windows = 8
}
Code:
const int F11 = 0x0312;


