Jump to content

How to add new window with button?


Recommended Posts

Every GUI(window) must have different controls like buttons check-box input etc..........And different loop here while

 

$gui1 = GUICreate("Window",300,100)
$btn1 = GUICtrlCreateButton("New",50,50,30,25)
GUISetState(@SW_SHOW)

While 1
    $Gmsg = GUIGetMsg()
    Switch $Gmsg
        Case $btn1
            $gui2 = GUICreate("Window2",200,80)
            $btn2 = GUICtrlCreateButton("New2",50,50,35,25)
            GUISetState(@SW_SHOW)
            While 2
                $Gmsg = GUIGetMsg()
                Switch $Gmsg
                    Case $btn2
                        MsgBox(0,"","HI")

                    Case -3
                        Exit
                        EndSwitch
            WEnd
        Case -3
            Exit
    EndSwitch
WEnd

GUISetState(@SW_SHOW)

 

Life is like a coin. You can spend it Anyway as you wish and for your kind information. "you can spend it only once."

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...