Code: Select all
Gui, Show,x20 y100 w1100 h800, Test Gui
WinSet, Region, 0-0 w(1100 * ( A_ScreenDPI / 96 )) h(900 * ( A_ScreenDPI / 96 )) R40-40, ahk_id %GUIHwnd%
Gui, +hwndGUIHwnd
Gui -MaximizeBox -MinimizeBox -Caption
Code: Select all
Gui, Show,x20 y100 w1100 h800, Test Gui
WinSet, Region, 0-0 w(1100 * ( A_ScreenDPI / 96 )) h(900 * ( A_ScreenDPI / 96 )) R40-40, ahk_id %GUIHwnd%
Gui, +hwndGUIHwnd
Gui -MaximizeBox -MinimizeBox -Caption
Code: Select all
Gui, -Caption +LastFound
w := 1100 * A_ScreenDPI / 96
h := 900 * A_ScreenDPI / 96
WinSet, Region, 0-0 w%w% h%h% R40-40
Gui, Show, x20 y100 w1100 h800, Test Gui
Hi,mikeyww wrote: ↑06 Oct 2022, 21:24Hi,
AHK commands use literal strings as parameters. You can force expressions with % if needed; see documentation.
Code: Select all
Gui, -Caption +LastFound w := 1100 * A_ScreenDPI / 96 h := 900 * A_ScreenDPI / 96 WinSet, Region, 0-0 w%w% h%h% R40-40 Gui, Show, x20 y100 w1100 h800, Test Gui