racerrunner Posted July 10, 2006 Posted July 10, 2006 Hi all, Is there a way to disable the Minimise and Close button? GUICreate("Testing", 200, 200) $today = GuiCtrlCreateButton("Add", 30, 20, 140, 30) $yesterday = GuiCtrlCreateButton("Remove", 30, 60, 140, 30) How to remove the min n close button that come with the GUI windows. Thank You.
Moderators SmOke_N Posted July 10, 2006 Moderators Posted July 10, 2006 (edited) Look at the opt#include <GUIConstants.au3> #NoTrayIcon Opt('GUIEventOptions', 1) HotKeySet('{esc}', '_Exit');Press the Esc key to exit out $GUI = GUICreate('') GUISetState() While 1 $msg = GuiGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ToolTip('You tried to close me!!') Case $msg = $GUI_EVENT_MINIMIZE ToolTip('You tried to minimize me!!') EndSelect WEnd Func _Exit() Exit 0 EndFuncEdit: LOL, It had the tongue.gif in the CODE AUTOIT .... just changed the : p to !! Edited July 10, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
racerrunner Posted July 10, 2006 Author Posted July 10, 2006 Thank You SmOke_N. What I mean is there a way not to show the minimise and close buttons at all or disable it like the maximum button? Thank You.
MHz Posted July 10, 2006 Posted July 10, 2006 Have a look at GuiCreate in the helpfile and note the options of using Styles and ExStyles
Moderators SmOke_N Posted July 10, 2006 Moderators Posted July 10, 2006 Thank You SmOke_N. What I mean is there a way not to show the minimise and close buttons at all or disable it like the maximum button? Thank You.#include <GUIConstants.au3> #NoTrayIcon HotKeySet('{esc}', '_Exit');Press the Esc key to exit out $GUI = GUICreate('', 200, 100, 100, 100, $WS_DLGFRAME) $Button = GUICtrlCreateButton('button 1', 10, 10, 60, 30) GUISetState(@SW_SHOW) While 1 $msg = GuiGetMsg() Select Case $msg = $Button ToolTip('You clicked the button!!') EndSelect WEnd Func _Exit() Exit 0 EndFunc Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
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