Jump to content

Gui Won't Close


Recommended Posts

Hello all,

The problem I'm having is when my script calls the GUI function the GUI opens accepts my input and continues the script, however it will not close the GUI until the script is completed.

Func imageVerify($picLoc)
    InetGet($picLoc,"C:\temp.jpg",0,0)
    
    GUICreate("My GUI picture",350,300,-1,-1,$WS_SIZEBOX+$WS_SYSMENU) ; will create a dialog box that when displayed is centered
    $pic = GUICtrlCreatePic("c:\temp.jpg",50,10, 200,50)
    $file = GUICtrlCreateInput ( "", 10,  60, 300, 20)
    $btn = GUICtrlCreateButton ("Ok", 40,  90, 60, 20)

    GUISetState () 

    $msg = 0
    While $msg <> $GUI_EVENT_CLOSE
           $msg = GUIGetMsg()
           Select
               Case $msg = $btn
                   exitloop
           EndSelect
    Wend
    Global $vCode = GUICtrlRead($file)
EndFunc

I'm sure it's probably something stupid I'm missing but I can't put my finger on it.

Thank you in advance!!!

~JD

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...