Sign in to follow this  
Followers 0
Sobiech

Closing by [ X ] button in right up corner

5 posts in this topic

Topic said all

where is the reason?

my GUI Loop

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case GUICtrlRead($input50) = "" ; Checks the path
            Local $path = GUICtrlRead($Input50)
            _CreateActive("Scripts")
            _SetSkillLabel()
        EndSwitch
WEnd

:mellow:

I have windows Vista HP


This world is crazy

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Its not working because you haven't created GUI :mellow:

Talking serious, post more code or it would be hard to gues what's going on.

Edited by Makaule

Share this post


Link to post
Share on other sites

Its not working because you haven't created GUI :mellow:

Talking serious, post more code or it would be hard to gues what's going on.

My GUI have ~~ 300 lines :P

Opt("GUIonEventMode", 1)

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#Include <File.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=e:\programy\inne\autoit3\scripts\replace\d2bs.kxf
$Form1 = GUICreate("D2BS GUI Config Editor v1.0", 748, 492, 192, 124)
$Tab1 = GUICtrlCreateTab(16, 8, 705, 465)
GUICtrlSetResizing(-1, $GUI_DOCKWIDTH+$GUI_DOCKHEIGHT)
$TabSheet1 = GUICtrlCreateTabItem("State")
$Group1 = GUICtrlCreateGroup("Active Scripts", 40, 40, 265, 417)
$Button2 = GUICtrlCreateButton("Edit file", 320, 64, 257, 57, $WS_GROUP)
$Button3 = GUICtrlCreateButton("Exit", 320, 128, 257, 65, $WS_GROUP)
;
; Some checkboxes, inputs etc.
;
GUISetState(@SW_SHOW)
GUICtrlSetOnEvent($Button1, "_setpath")
GUICtrlSetOnEvent($Button2, "_MainEdit")
GUICtrlSetOnEvent($Button3, "_Exit")
#EndRegion ### END Koda GUI section ###

$k = 0
$l = 0
While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case GUICtrlRead($input50) = "" ; Checks the path
            Local $path = GUICtrlRead($Input50)
            _CreateActive("Scripts")
            _SetSkillLabel()
        EndSwitch
WEnd

This world is crazy

Share this post


Link to post
Share on other sites

If the GUIOnEventMode option is set to 1 then the return from GUIGetMsg is always 0 and the @error is set to 1.

If the option GUIEventOptions is set to 1 the minimize, restore and maximize button will not do any action on the window just a simple notification

try this for [X] button

GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")

Share this post


Link to post
Share on other sites

try this for [X] button

GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")

Thx : D

Work


This world is crazy

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