Jump to content

Question about Guide


Recommended Posts

i want to create a main GUI, when click a button on this GUI ,the program will display a another GUI(called childGui),after some operators, i click a button on childGui to switch to main GUI(and childGui willbe close) but my program cant do it.What's function in AutoIT which can do it?

Thanks alot

Link to comment
Share on other sites

Hello,

$GUI = GUICreate("MainGUI", 200, 200, -1, -1)
$OpenChild = GUICtrlCreateButton("Open", 65, 75, 70)

GUISetState()
While 1
    $nMsg = GUIGetMsg()
    Select
    Case $nMsg = -3 ; $GUI_EVENT_CLOSE
        Exit
    Case $nMsg = $OpenChild
        _MyFunc()
    EndSelect
WEnd

Func _MyFunc()
    $GUI2 = GUICreate("ChildGUI", 200, 200, 300, 300)
    
    GUISetState()
    While 2
        $nMsg2 = GUIGetMsg()
        Select
        Case $nMsg2 = -3 ; $GUI_EVENT_CLOSE
            ExitLoop
        EndSelect
    WEnd
    GUIDelete($GUI2)
EndFunc

Is this helpfull?

AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

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