#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 633, 447, 192, 124)
$Pic1 = GUICtrlCreatePic("", 64, 104, 281, 89, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUICtrlSetImage(-1,"1.jpg")
$dd=1
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$ID=GUIGetCursorInfo()
if $ID[4]=$Pic1 Then
GUICtrlSetImage($Pic1,"2.jpg")
Else
GUICtrlSetImage($Pic1,"1.jpg")
endif
$nMsg = GUIGetMsg(1)
Switch $nMsg[0]
Case $GUI_EVENT_CLOSE
Exit
Case $Pic1
MsgBox(0,0,"你点了图形按钮")
EndSwitch
WEnd
|