Jump to content
Sign in to follow this  

Last Button Pressed

Recommended Posts


Is it possible to remove those "dots" that mark the last button pressed in a GUI?

thanks for any help,


Share this post

Link to post
Share on other sites

Theres probably another way, but I would have whatever function is called do as the last thing a mouseclick somewhere else (the desktop, or an unused part of the GUI..) to remove the focus from the button that was clicked to call it..

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post

Link to post
Share on other sites

What dots?

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>

$Form1 = GUICreate("Form1", 250, 57, 192, 124)
$Button1 = GUICtrlCreateButton("1", 8, 8, 75, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("2", 88, 8, 75, 25, $WS_GROUP)
$Button3 = GUICtrlCreateButton("3", 168, 8, 75, 25, $WS_GROUP)
$Label1 = GUICtrlCreateLabel("Last button pressed: ", 72, 40, 1000, 20)

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
        Case $Button1
            GUICtrlSetData($Label1,"Last button pressed: 1")
        Case $Button2
            GUICtrlSetData($Label1,"Last button pressed: 2")
        Case $Button3
            GUICtrlSetData($Label1,"Last button pressed: 3")
Edited by Info

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