njdev1k 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 comment Share on other sites More sharing options...
Administrators Jon 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 comment Share on other sites More sharing options...
CyberSlug 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 comment Share on other sites More sharing options...
Josbe 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 comment Share on other sites More sharing options...
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