Cant move gui after removing her 'caption'

Viewed 45

Maybe someone knows if it is possible to move GUI while -caption is enabled?

Since the toolbar is removed with GUI -caption, now I can not move GUI with the mouse.

1 Answers

All that is necessary to add to your scripts is the OnMessage line and the WM_LBUTTON function in the script below to allow you to move the GUI:

OnMessage(0x0201, "WM_LBUTTONDOWN")
Gui, -Caption
Gui, Show, w500 h200
return

WM_LBUTTONDOWN() {
    PostMessage, 0xA1, 2,,, A
}

Esc::ExitApp
Related