Jump to content

child windows


Recommended Posts

#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]

Link to comment
Share on other sites

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.

 

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