简体   繁体   中英

Keep window maximized with AutoHotkey?

I have an AutoHotkey script that launches an application maximized like this:

`Run, myprogram.exe,, Max`

It then gets rid of the minimize and restore buttons. I can still click on the task bar and drag downwards to restore the window. Is there any good way to keep my window maximized in AHK? How about just locking the window's position?

Does the F11 key maximize the app? When in F11 mode most apps completely lose their title bar.
If so, run the app then send an F11 key (You may need to wait a bit for the app to be active or something).
Failing that, yes you could have an infinite loop running that monitored the window position / size (WinGetPos) and if it was not at 0,0 and the size of the screen (A_ScreenWidth, A_ScreenHeight), then move it to that position and size (WinMove).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM