njdev1k 0 Posted October 8, 2004 Share Posted October 8, 2004 Is there a way to grey out or disable the Close window button on the GUI window? I am speaking of the "X" in the top right corner of the window. Link to post Share on other sites
Administrators Jon 1,207 Posted October 8, 2004 Administrators Share Posted October 8, 2004 Is there a way to grey out or disable the Close window button on the GUI window?I am speaking of the "X" in the top right corner of the window.In the current unstable version the close button just sends a message saying "close was clicked". You can decide what to do after getting the message, i.e. close the window or ignore it. Deployment Blog: https://www.autoitconsulting.com/site/blog/ SCCM SDK Programming: https://www.autoitconsulting.com/site/sccm-sdk/ Link to post Share on other sites
CyberSlug 6 Posted October 8, 2004 Share Posted October 8, 2004 I think there would be a way to use DllCall.... but the following fails $hWnd = GuiCreate("foo", 300, 200) GuiSetState() $hMenu = DllCall("user32.dll", "long", "GetSystemMenu", "hwnd", $hWnd, "long", 0) DllCall("user32.dll", "long", "DeleteMenu", "long", $hMenu, "long", 6, "long", 0x2) DllCall("user32.dll", "long", "DrawMenuBar Lib", "hwnd", $hWnd) While GuiGetMsg() <> -3 WEnd Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to post Share on other sites
Josbe 1 Posted October 8, 2004 Share Posted October 8, 2004 $hWnd = GuiCreate("foo", 300, 200) $hMenu = DllCall("user32.dll", "long", "GetSystemMenu", "hwnd", $hWnd, "long", 0) DllCall("user32.dll", "long", "RemoveMenu", "long", $hMenu[0], "long", 6, "long", 0x400) GuiSetState() While GuiGetMsg() <> -3 WEnd<{POST_SNAPBACK}>Nice tip. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to post Share on other sites
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now