Sign in to follow this  
Followers 0
khang0001

how to open and close mini GUI independence in main GUI

2 posts in this topic

#include <GUIConstantsEx.au3>

Opt("GUIOnEventMode", 1)  ; Change to OnEvent mode 
$mainwindow = GUICreate("Hello World", 200, 100)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")
GUICtrlCreateLabel("Hello world! How are you?", 30, 10)
$okbutton = GUICtrlCreateButton("OK", 70, 50, 60)
GUICtrlSetOnEvent($okbutton, "OKButton")



GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked")


GUISwitch($mainwindow)
GUISetState(@SW_SHOW)

While 1
  Sleep(1000)  
WEnd

Func OKButton()
  
GUICreate("next", 500,500,500,500)
GUISetState()   
EndFunc

Func CLOSEClicked()
  
  If @GUI_WINHANDLE = $mainwindow Then 
    Exit
  EndIf
EndFunc

when I click the button OK. It make 1 GUI next. I click 10 times in button Ok. it make 10 Gui next. how can I click 10 times in button OK. and it make 1 GUI next. and how can i close the GUI next independence with GUI hello world. please help meeeeee

Share this post


Link to post
Share on other sites



when I click the button OK. It make 1 GUI next. I click 10 times in button Ok. it make 10 Gui next. how can I click 10 times in button OK. and it make 1 GUI next. and how can i close the GUI next independence with GUI hello world. please help meeeeee

Did you make time to go through this first?

Multi Gui


Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0