本帖最后由 blue_dvd 于 2012-12-27 11:36 编辑
想要制作图片显示GUI,按按钮就显示另外一张图!刚学不同如何操作?#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 320, 246, 347, 195)
$Pic1 = GUICtrlCreatePic(@ScriptDir&""&"1.jpg", 80, 24, 105, 121)
$Button1 = GUICtrlCreateButton("换图", 88, 168, 89, 33)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
GUICtrlSetData($Pic1,@ScriptDir&""&"2.jpg")
EndSwitch
WEnd
两个图如下
|