Sign in to follow this  
Followers 0
Docfxit

How to close a GUI

2 posts in this topic

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()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        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)   
           Else
                GUICtrlSetData($Status, "")
            EndIf
    EndSelect
WEnd

Share this post


Link to post
Share on other sites



guidelete will remove the 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