public static CloseSuspendedWindow ( ) : void | ||
return | void |
protected override void WndProc(ref Message m) { if (m.Msg == 0xC) { // This messages is send by AutoHotkey to execute a command string command = Marshal.PtrToStringUni(m.LParam); if (command != null) { if (CommandManager.ExecuteCommand(command)) { return; //if the passed along string is a command, we have executed it successfully } } } if (m.Msg == 0x317) { // We intercept this message because this message signifies the AutoHotkey state (suspended or not) int wParam = m.WParam.ToInt32(); if (wParam == 32) { // 32 signifies we have entered suspended mode, so we warn the user with a popup AutoHotkeyManager.ShowSuspendedWindow(); } else if (wParam == 33) { // 33 signifies we are not suspended, destroy the suspended window (if it exists) AutoHotkeyManager.CloseSuspendedWindow(); } } base.WndProc(ref m); }
private void closeSuspendedWindow_Click(object sender, EventArgs e) { AutoHotkeyManager.CloseSuspendedWindow(); }