|
发表于 2010-11-21 11:11:07
|
显示全部楼层
楼主可以用事件模式,这样图片即可以循环,也不影响点击了
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
$Form1 = GUICreate("Form1", 250, 250, 192, 124)
GUISetOnEvent($GUI_EVENT_CLOSE, "GUI")
$Pic = GUICtrlCreatePic("", 100, 100, 32, 32)
GUICtrlSetOnEvent(-1, "GUI")
GUICtrlSetCursor (-1, 0)
GUISetState(@SW_SHOW)
$Bmp1 = @ProgramFilesDir & "\AutoIt3\Examples\GUI\Advanced\Images\Blue.bmp"
$Bmp2 = @ProgramFilesDir & "\AutoIt3\Examples\GUI\Advanced\Images\red.bmp"
While 1
GUICtrlSetImage($Pic, $Bmp2)
Sleep(500)
GUICtrlSetImage($Pic, $Bmp1)
Sleep(500)
WEnd
Func GUI()
Switch @GUI_CtrlId
Case $GUI_EVENT_CLOSE
Exit
Case $Pic
ShellExecute("http://www.cqluo.com")
EndSwitch
EndFunc |
|