Jump to content
Sign in to follow this  
B3TA_SCR1PT3R

child windows

Recommended Posts

B3TA_SCR1PT3R

#include <GuiConstants.au3>
$mainframe = GuiCreate("gui",500,300)
$but = GuiCtrlCreateButton("me",49,49,49,49)
While 1
    $msg = GuiGetMsg()
    Select
    Case $msg = $GUI_EVENT_CLOSE
        ExitLoop
    Case $msg = $but
        $setgui = GuiCreate("Settings",300,300,-1,-1,-1,-1,$mainframe)
        GuiSetState()
        If $msg = $GUI_EVENT_CLOSE Then
            GuiSwitch($setgui)
            GuiDelete()
        EndIf
    EndSelect
WEnd
Exit

..i dont understand child guis ...and so how do i make just hhe child close not parent

i looked in the helpfile but i have buttons and stuff i wanna make in the child gui and on normal gui so how do i do the $msg[1] but for normal events wat do i type?>


[right][font="Courier New"]...Run these streets all day, I can sleep when I die.[/font] [/right]

Share this post


Link to post
Share on other sites
GaryFrost

here's an example:

#include <GuiConstants.au3>

$main = GUICreate("MyGUI", 392, 322)

$Button_1 = GUICtrlCreateButton("Input", 140, 190, 70, 30)

GUISetState()
While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $Button_1
            GUISetState(@SW_DISABLE, $main)
            _Input()
            GUISetState(@SW_ENABLE, $main)
            GUISetState(@SW_SHOW)
        Case Else
       ;;;
    EndSelect
WEnd
Exit

Func _Input()
    $popup = GUICreate("PopUP", 191, 85, -1, -1, $WS_DLGFRAME, $WS_EX_TOPMOST)
    
    $Input_1 = GUICtrlCreateInput("Input1", 0, 0, 180, 20)
    $Button_2 = GUICtrlCreateButton("OK", 60, 40, 60, 20)
    
    GUISetState()
    While 1
        $msg2 = GUIGetMsg()
        Select
            Case $msg2 = $Button_2
                ExitLoop
            Case Else
           ;;;
        EndSelect
    WEnd
    GUIDelete($popup)
EndFunc ;==>_Input

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.