Jump to content

GUI Hangs Intermittently


Wyngnut
 Share

Recommended Posts

Hi,

I am writing a GUI and I am having an issue with the following code block.  Some machines the Close button doesn't work at all, some machines the button is intermittent (it is unresponsive once in a while).  Sometimes I have to click outside the window the back on the close and it is unresponsive.  Am I doing something wrong?

 

Thanks!

Chris

 

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.14.5
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate( "", 300, 500, 10, 10 )
$Label1 = GUICtrlCreateLabel( "", 10, 20, 240, 200 )
$Label2 = GUICtrlCreateLabel( "", 10, 70, 240, 200 )
$Label3 = GUICtrlCreateLabel( "", 10, 100, 240, 200 )
$Label4 = GUICtrlCreateLabel( "", 10, 130, 240, 200 )
$Label5 = GUICtrlCreateLabel( "", 10, 160, 240, 200 )
$Label6 = GUICtrlCreateLabel( "", 10, 190, 240, 200 )
$Label7 = GUICtrlCreateLabel( "", 10, 220, 240, 200 )
$Label8 = GUICtrlCreateLabel( "", 10, 330, 240, 200 )
$ButtonClose = GUICtrlCreateButton( "Close", 210, 470, 85, 25 )

GUISetState( @SW_SHOW, $Form1 )

While 1
   $nMsg = GUIGetMsg()
   Switch $nMsg
   Case $GUI_EVENT_CLOSE
      Exit
   Case $ButtonClose
      Exit
   EndSwitch
WEnd

 

 

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