Jump to content

GUI Exit Problem


Go to solution Solved by somdcomputerguy,

Recommended Posts

Posted

Hello, for the past couple days have been programming in AutoIT. Today I decided to make a GUI program, as i was doing that i ran into a problem... I can't exit the program with the red X. Is there some kind of function i should use? A example script would be nice.

Thanks 

  • Solution
Posted

This is a stripped down version of the example in the help file.

#include <GUIConstantsEx.au3>

Example1()

; example 1
Func Example1()
    Local $msg

    GUICreate("My GUI") ; will create a dialog box that when displayed is centered
    GUISetState(@SW_SHOW) ; will display an empty dialog box

    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()

        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd
    GUIDelete()
EndFunc   ;==>Example1

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

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
  • Recently Browsing   0 members

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