Sign in to follow this  
Followers 0
toothyXdip

window help

3 posts in this topic

#1 ·  Posted (edited)

ok i want to know is there a way to have a main window open (dummy) and from that have a button/menu that you can click/goto and it will open another window (dummy) and in that one have lables and all the other stuff.

I tryed but it opened the secondary window not the main window...i want to go from the main TO the secondary not start off with the secondary.

can i do that? cause i dont want to have to use msgbox's all the time for my program

so pretty much i want to open one window from anther window

o ya i still need help with number 1

Edited by toothyXdip

---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝''''''╝╝║'''......''''''''''''''''''''''''''''''---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝

Share this post


Link to post
Share on other sites



ok i want to know is there a way to have a main window open (dummy) and from that have a button/menu that you can click/goto and it will open another window (dummy) and in that one have lables and all the other stuff.

I tryed but it opened the secondary window not the main window...i want to go from the main TO the secondary not start off with the secondary.

can i do that? cause i dont want to have to use msgbox's all the time for my program

so pretty much i want to open one window from anther window

o ya i still need help with number 1

Please don't double post (Here and the GUI forum)

Yes it is possible. see here

(Crappy example, But this works)

#include <GuiConstants.au3>

$MainGUI=GUICreate("MainGui", 100,100)
$Button1 = GUICtrlCreateButton("New Window!", 10,10,80,80)
GUISetState(@SW_SHOW, $MainGUI)

While 1
    $Msg1 = GUIGetMsg()
    Switch $msg1
        Case $GUI_EVENT_CLOSE 
            Exit
        Case $Button1
            If WinExists("POPUP!") Then
                GUISetState(@SW_SHOW, $Dummy1)
            Else    
                PopUp1()
            EndIf
    EndSwitch
WEnd

Func Popup1()
    Global $Dummy1 = GUICreate("POPUP!", 100, 100, @DesktopWidth/2+100,-1)
    $Button2 = GUICtrlCreateButton("CloseMe!", 10,10, 80,80)
    GUISetState(@SW_SHOW, $Dummy1)
    
    While 1
        $msg2 = GUIGetMsg()
        Switch $msg2
            Case $GUI_EVENT_CLOSE
                GUIDelete($Dummy1)
                ExitLoop
            Case $Button2
                GUIDelete($Dummy1)
                ExitLoop
        EndSwitch
    WEnd
EndFunc

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