Is it possible to catch the close button and minimize the window instead? AutoHotKey
问题 I want all programs in my computer to be closed only by right clicking the taskbar icon and choosing close. So when I click the X button on any window, it should translate to minimize instead. How can I achieve this using AutoHotKey? 回答1: This AutoHotkey script should achieve what you're looking for. Note: the code may not work correctly if aero mode is on. MouseGetPos gets the hWnd of the window under the cursor. WM_NCHITTEST gets information about the type of item under the cursor, needing