Jump to content
Sign in to follow this  
Innovative

Mouseon ?

Recommended Posts

Innovative

Im creating a button using an image .. How do i set like if the mouse is on the image , the image will change to another one (which will be kinda pop up that display the mouse is on the button)

How do i do it?

Share this post


Link to post
Share on other sites
someone

Does XSkin not work for you in this case?


While ProcessExists('Andrews bad day.exe')
	BlockInput(1)
	SoundPlay('Music.wav')
	SoundSetWaveVolume('Louder')
WEnd

Share this post


Link to post
Share on other sites
monoceres

MsCreatoR has created a very nice UDF named GUICtrlSetOnHover()!

Mouse Hover UDF


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

Share this post


Link to post
Share on other sites
Innovative

I've read the file .. Its like , WTF , so complicated ? Any other ways?

Share this post


Link to post
Share on other sites
Nahuel

I've read the file .. Its like , WTF , so complicated ? Any other ways?

Download this example: (If I'm not wrong, it's in one of those links they already sent you.)

Share this post


Link to post
Share on other sites
monoceres

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!

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  

×