(Please forgive me if this has been asked before... If it has I apparently do not know how to word the request.)
I'm writing a program for work, and due to the amount of users working in various "departments" I use an INI file to save individual preferences. The problem I'm having is with terminating the sub Gui (Gui 2)
I have a cancel button that calls the following code:
Code:
Gui2Close:
Gui, Destroy
Return
However the "X" button is not using this GoSub... I think it is actually doing a hide type command, the problem then becomes that if I try to open my settings window again I run into problems where the Sub Gui declares variables it freaks out when the variables are declared... a second time. Using the Cancel button does not create this problem. So I'm trying to figure out how to alter the "X" buttons behavior on a sub Gui, or how to disable the "X" button on the sub gui.
Thank you for your assistance,
Sam