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

[GUI管理] GUICtrlCreatePic如何初始化

[复制链接]
发表于 2014-4-25 18:16:32 | 显示全部楼层 |阅读模式
GUICtrlCreatePic如何初始化,源码如下:
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", @DesktopWidth, @DesktopHeight, -1, -1,$WS_SIZEBOX+$WS_MINIMIZEBOX+$WS_MAXIMIZEBOX)
$Next = GUICtrlCreateButton("Next", @DesktopWidth-200, @DesktopHeight-100, 80, 30)
GUICtrlSetFont(-1, 20, 10000, 0, "@新宋体")
$jpgR=GUICtrlCreatePic("",0,60,@DesktopWidth/2-5, @DesktopHeight/2)
$jpgC=GUICtrlCreatePic("", @DesktopWidth/2+5, 60, @DesktopWidth/2, @DesktopHeight/2)
$jpgR21=GUICtrlCreatePic("",0,60,@DesktopWidth/4-2, @DesktopHeight/2)
$jpgR22=GUICtrlCreatePic("",@DesktopWidth/4,60,@DesktopWidth/4-2, @DesktopHeight/2)
$jpgR41=GUICtrlCreatePic("",0,60,@DesktopWidth/4-2, @DesktopHeight/4)
$jpgR42=GUICtrlCreatePic("",0,60+@DesktopHeight/4+2,@DesktopWidth/4-2, @DesktopHeight/4)
$jpgR43=GUICtrlCreatePic("",@DesktopWidth/4+2,60,@DesktopWidth/4-2, @DesktopHeight/4)
$jpgR44=GUICtrlCreatePic("",@DesktopWidth/4+2,60+@DesktopHeight/4+2,@DesktopWidth/4-2, @DesktopHeight/4)
GUISetState(@SW_SHOW)
$i=0
While 1
        $nMsg = GUIGetMsg()
        Select
Case $nMsg = $GUI_EVENT_CLOSE
ExitLoop
        Case $nMsg =$Next
                                $i=$i+1
                                If $i=1 Then
        GUICtrlSetImage($jpgR,"E:\Result\A001.jpg")
        GUICtrlSetImage($jpgC21,"E:\Criteria\A001.jpg")
        GUICtrlSetImage($jpgC22,"E:\Criteria\A001.jpg")
EndIf
If $i=2 Then
        GUICtrlSetImage($jpgR41,"E:\Result\A001.jpg")
        GUICtrlSetImage($jpgR42,"E:\Result\A001.jpg")
        GUICtrlSetImage($jpgR43,"E:\Result\A001.jpg")
        GUICtrlSetImage($jpgC21,"E:\Criteria\A001.jpg")
        GUICtrlSetImage($jpgC22,"E:\Criteria\A001.jpg")
EndIf
                                EndSelect                               
WEnd

当运行后,后面的图片不会完全遮挡之前的图片。
希望结果:可以初始化GUICtrlCreatePic,然后按下Next按钮之后,会显示当前需要的图片,上一次显示的图片就不再显示
发表于 2014-4-25 19:41:55 | 显示全部楼层
例如:GUICtrlSetImage($jpgR,"")
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-11-17 02:46 , Processed in 0.070729 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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