Jump to content

GUICreate help


Recommended Posts

if i have two GUICreate

for ex.

$Menu1=GUICreate("",200,200,-1,-1,-1,BitOR(@SW_SHOW,$WS_EX_TOOLWINDOW))

$Menu2=GUICreate("",200,200,-1,-1,-1,BitOR(@SW_HIDE,$WS_EX_TOOLWINDOW))

when i start the script will show me $Main1 then if i press some buton it will show $Main2

how i can make it, if i press $Menu2 close("X") buton to dont close script only to close or hide $menu2....

i wait advices

tnx

Link to comment
Share on other sites

Maybe...

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

$Menu1=GUICreate("",400,400,-1,-1,-1,$WS_EX_TOOLWINDOW)
$Button = GUICtrlCreateButton("Show Menu 2", 30, 50, 100, 25)

GUISetState()
$Menu2=GUICreate("",200,200,-1,-1,-1,$WS_EX_TOOLWINDOW)
GUISetState(@SW_HIDE)

While 1
    $msg = GUIGetMsg()
    If $msg = -3 Then
        If WinActive($Menu1) then Exit
        GUISetState(@SW_HIDE, $Menu2)
    EndIf
    If $msg = $Button Then GUISetState(@SW_SHOW, $Menu2)
WEnd

8)

NEWHeader1.png

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