metis Posted May 30, 2012 Posted May 30, 2012 What is wrong ? Wrong ;/ HElp !! expandcollapse popupGUI ... Opt("GUIOnEventMode", 1) GUICtrlSetOnEvent($Button1, "_zrob_kalkulacje") GUISetOnEvent($GUI_EVENT_CLOSE, "exitgui1") Example(); While 1 Sleep(100) WEnd Func _zrob_kalkulacje() GUISetState(@SW_SHOW, $hGUI_calc) EndFunc> Func Example() $tester = GUICreate("Parent1") GUISetOnEvent($GUI_EVENT_CLOSE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_MINIMIZE, "SpecialEvents") GUISetOnEvent($GUI_EVENT_RESTORE, "SpecialEvents") GUICtrlCreateButton("OK", 10, 30, 50) GUICtrlSetOnEvent(-1, "OKPressed") GUICtrlCreateButton("Cancel", 0, -1) GUICtrlSetOnEvent(-1, "CancelPressed") GUISetState(@SW_HIDE) EndFunc ;==>Example Func OKPressed() MsgBox(0, "OK Pressed", "ID=" & @GUI_CtrlId & " WinHandle=" & @GUI_WinHandle & " CtrlHandle=" & @GUI_CtrlHandle) EndFunc ;==>OKPressed Func CancelPressed() MsgBox(0, "Cancel Pressed", "ID=" & @GUI_CtrlId & " WinHandle=" & @GUI_WinHandle & " CtrlHandle=" & @GUI_CtrlHandle) EndFunc ;==>CancelPressed
Zedna Posted May 30, 2012 Posted May 30, 2012 http://www.autoitscript.com/wiki/Managing_Multiple_GUIs Resources UDF ResourcesEx UDF AutoIt Forum Search
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