Jump to content

Mouseon ?


Recommended Posts

Here's a quick example on how to use the GUICtrlSetOnHover() UDF:

#include <GUIConstants.au3>
#include "GUICtrlSetOnHover_UDF.au3"

Opt("GUIOnEventMode",1)
Global $inc, $state=False
GUICreate("Test",160,50)
$button=GUICtrlCreateButton("Number of times hovered: 0",10,10)
GUICtrlSetOnHover($button, "hover", "endhover")
GUISetOnEvent($GUI_EVENT_CLOSE,"close")
GUISetState()

while 1
    Sleep(100)
WEnd


Func hover ($ctrlid)
    If Not $state Then
        $inc+=1
        GUICtrlSetData($button,"Number of times hovered: "&$inc)
        $state=True
    EndIf
EndFunc

Func endhover ($ctrlid)
    $state=False
EndFunc



Func close ()
    Exit
EndFunc

Broken link? PM me and I'll send you the file!

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