Sign in to follow this  
Followers 0
Merchants

GUI run case on pressing enter

2 posts in this topic

#1 ·  Posted (edited)

is there a way to press enter and run the case like this i tink:

TesT()
Func TesT()
    Local $GUI, $msg, $Button
    $GUI = GUICreate("TesT", 495, 250)
    $Button = GuiCtrlCreateButton("Ok", 10, 10, 27, 20)
    While 1
        $msg = GUIGetMsg($GUI)
        Select
            Case $msg = $Button or {Enter}
                MsgBox(64,"TesT", "You pressed Ok")
        EndSelect
    WEnd
EndFunc
Edited by Merchants

Share this post


Link to post
Share on other sites



Sure, have a look at styles or exstyles for the button creation function. IIRC, it has one for default button. :mellow:

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