Terrified Posted November 23, 2007 Share Posted November 23, 2007 Hi im new here so dont laugh at me i want to make a button and after ill click on him it will open me a new gui window. how can i do that ? Link to comment Share on other sites More sharing options...
Valuater Posted November 23, 2007 Share Posted November 23, 2007 #include <GUIConstants.au3> $Main = GUICreate("My GUI") ; will create a dialog box that when displayed is centered $button = GUICtrlCreateButton( "Presss here", 120, 150, 150, 20) GUISetState (@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $button Then Build_GUI() Wend Func Build_GUI() $gui=GUICreate("Second GUI", -1, 300, 300, 300) GUISetState(@SW_SHOW) EndFunc 8) Link to comment Share on other sites More sharing options...
Terrified Posted November 23, 2007 Author Share Posted November 23, 2007 ty its work but i dont want it to close both gui window when i click exit button, so what should i do? Link to comment Share on other sites More sharing options...
Valuater Posted November 23, 2007 Share Posted November 23, 2007 #include <GUIConstants.au3> Dim $gui $Main = GUICreate("My GUI") ; will create a dialog box that when displayed is centered $button = GUICtrlCreateButton( "Presss here", 120, 150, 150, 20) GUISetState (@SW_SHOW) ; will display an empty dialog box ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then If WinExists($gui) Then GUIDelete($gui) Else Exit EndIf EndIf If $msg = $button Then Build_GUI() Wend Func Build_GUI() $gui=GUICreate("Second GUI", -1, 300, 300, 300) GUISetState(@SW_SHOW) EndFunc 8) Link to comment Share on other sites More sharing options...
Terrified Posted November 23, 2007 Author Share Posted November 23, 2007 ty btw wich progreminng language used at autoit? Link to comment Share on other sites More sharing options...
Valuater Posted November 23, 2007 Share Posted November 23, 2007 ty btw wich progreminng language used at autoit?C++8) 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