Keep window maximized with AutoHotkey?

时光怂恿深爱的人放手 提交于 2019-12-23 02:59:07

问题


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?


回答1:


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).



来源:https://stackoverflow.com/questions/41877213/keep-window-maximized-with-autohotkey

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!