star2 Posted December 24, 2007 Share Posted December 24, 2007 (edited) this is the GUI #include <GuiConstants.au3> GUICreate("testing", 120, 60) $button = GUICtrlCreateButton ("", 5 , 5, 48 , 48 , $BS_icon) GUICtrlSetImage ($button, "shell32.dll",210,1) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect hoover() WEnd Func hoover() $a=GUIGetCursorInfo() If $a[4] = 3 Then GUICtrlSetImage ($button, "shell32.dll",20,1) Else GUICtrlSetImage ($button, "shell32.dll",210,1) EndIf If $a[2] = 1 Then GUICtrlSetImage ($button, "shell32.dll",25,1) EndIf EndFunc I tried but I really need a certain method for avoiding this kind of flickering Edited December 24, 2007 by star2 [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u] Link to comment Share on other sites More sharing options...
Zedna Posted December 24, 2007 Share Posted December 24, 2007 #include <GuiConstants.au3> Global $state, $state_old GUICreate("testing", 120, 60) $button = GUICtrlCreateButton ("", 5 , 5, 48 , 48 , $BS_icon) GUICtrlSetImage ($button, "shell32.dll",210,1) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect hoover() WEnd Func hoover() $a=GUIGetCursorInfo() If $a[4] = 3 Then $state = 20 Else $state = 210 EndIf If $a[2] = 1 Then $state = 25 EndIf If $state <> $state_old Then GUICtrlSetImage ($button, "shell32.dll",$state,1) $state_old = $state EndIf EndFunc Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
star2 Posted December 24, 2007 Author Share Posted December 24, 2007 thank you Zedna that was great you know I've never used this Global I'm gonna look for the help file now all this time I didn't think it's important but it looks like I was wrong thanks again [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u] Link to comment Share on other sites More sharing options...
star2 Posted December 24, 2007 Author Share Posted December 24, 2007 (edited) #include <GuiConstants.au3> Global $state, $state_old $gui = GUICreate("testing", 120, 60) $button = GUICtrlCreateButton ("", 5 , 5, 48 , 48 , $BS_icon) GUICtrlSetImage ($button, "shell32.dll",210,1) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit EndSelect hoover() WEnd Func hoover() $a=GUIGetCursorInfo($gui) If $a[4] = 3 Then $state = 20 Else $state = 210 EndIf If $a[4] = 3 And $a[2] = 1 Then $state = 25 EndIf If $state <> $state_old Then GUICtrlSetImage ($button, "shell32.dll",$state,1) $state_old = $state EndIf EndFunc made a few fixes Edited December 24, 2007 by star2 [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now