找回密码
 加入
搜索
查看: 1696|回复: 1

[GUI管理] 关于图片显示问题?【已解决】

[复制链接]
发表于 2012-12-27 11:23:08 | 显示全部楼层 |阅读模式
本帖最后由 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
两个图如下

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
 楼主| 发表于 2012-12-27 11:34:36 | 显示全部楼层
晕,傻了,原来用GUICtrlSetImage就行了!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-6-1 10:21 , Processed in 0.079054 second(s), 25 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表