Jump to content
Sign in to follow this  

How to close a GUI

Recommended Posts


I'd like to find out how to close the window as soon as it's used without having to click on the x in the upper right.

While 1
    $msg = GUIGetMsg()
        Case $msg = $GUI_EVENT_CLOSE
        Case $msg = $Btn_GET
            $a_sel = _GUICtrlEditGetSel ($myedit)
            If ($a_sel == $EC_ERR) Then
                GUICtrlSetData($Status, "Error getting sel positions")
            ElseIf (IsArray($a_sel)) Then
                $NewVendor = StringMid(GUICtrlRead($myedit), $a_Sel[1] + 1, ($a_Sel[2] - $a_Sel[1]) + 1)
                GUICtrlSetData($Status, $NewVendor)
                ReDim $Vendor[UBound($Vendor) + 1]
                ReDim $Account[UBound($Account) + 1]
                $Vendor[Ubound($Vendor) -1] = $NewVendor
                $Account[Ubound($Account) -1] = $AccountSelected
                $sRecordOut = $NewVendor & "," & $AccountSelected
                FileWriteLine($hQBOffSetEntries, $sRecordOut & @CRLF)   
                GUICtrlSetData($Status, "")

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.