多加一次负值操作就可以了
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 300, 198, 192, 114)
$Icon1 = GUICtrlCreateIcon("d:\我的文档\桌面\ico dll\icon_5.dll", -144, 48, 40, 32, 32)
$Button1 = GUICtrlCreateButton("sd", 48, 136, 75, 25)
$Button2 = GUICtrlCreateButton("ds", 144, 136, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
$Icon1 = GUICtrlCreateIcon("d:\我的文档\桌面\ico dll\icon_5.dll", -144, 48, 40, 32, 32)
$Icon1 = GUICtrlCreateIcon("d:\我的文档\桌面\ico dll\icon_5.dll", -144, 48, 40, 32, 32)
Case $Button2
$Icon1 = GUICtrlCreateIcon("d:\我的文档\桌面\ico dll\icon_5.dll", -152, 48, 40, 32, 32)
$Icon1 = GUICtrlCreateIcon("d:\我的文档\桌面\ico dll\icon_5.dll", -152, 48, 40, 32, 32)
EndSwitch
WEnd
;"d:\我的文档\桌面\ico dll\icon_5.dll", -144 是个图标 为绿色√
;"d:\我的文档\桌面\ico dll\icon_5.dll", -152 是个图标 为红色的×
|