Jump to content

When a button is pressed


Recommended Posts

Open your helpfile and read ALL three pages under "GUI Reference". It will teach you how to build basic gui's in two different ways, commonly called after how they work, MessageLoop and OnEvent.

Link to comment
Share on other sites

$button = GUICtrlCreateButton("Click Me", 10, 10, 80, 25)

While 1
    $msg = GUIGetMsg()

    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $button
            msgbox(0,"Status","Yes, you did click on me!")
    EndSelect
WEnd

Edited by DYONISII

http://dev.dyonisii.com/

Link to comment
Share on other sites

$button = GUICtrlCreateButton("Click Me", 10, 10, 80, 25)

While 1
    $msg = GUIGetMsg()

    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        Case $msg = $button
            msgbox(0,"Status","Yes, you did click on me!")
    EndSelect
WEnd

AdmiralAlkex gave the OP the best advice he could get, yet you post a simple button code with missing parts such as the actual GUICreate() and includes. Edited by Info
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...