3
2

发布一个原创图片轮换源码

Au3编程学习2023-01-28 21:13重庆
3833
#include <GUIConstantsEx.au3>
#include <Misc.au3>
#include <WindowsConstants.au3>
#include <MsgBoxConstants.au3>
#include <ButtonConstants.au3>
#include <Timers.au3>
#include <WinAPIEx.au3>
#include <GuiListView.au3>
#include <Date.au3>
#include <ComboConstants.au3>
Global $mht, $count = 0
$mht=GUICreate("",730,480)
$pic1=GUICtrlCreatePic("D:\AU3\1.JPG",10,38,710,368)

$pic2=GUICtrlCreatePic("D:\AU3\2.JPG",10,38,710,368)

$pic3=GUICtrlCreatePic("D:\AU3\3.JPG",10,38,710,368)

$pic4=GUICtrlCreatePic("D:\AU3\4.JPG",10,38,710,368)

$pic5=GUICtrlCreatePic("D:\AU3\5.JPG",10,38,710,368)

$guib=GUICtrlCreateButton("",10,400,710,30)
GUICtrlSetFont(-1, 11, 400, 2, "微软雅黑")
AdlibRegister("_pic",5000)
GUISetState()
While 1
Switch GUIGetMsg()
Case $GUI_EVENT_CLOSE
Exit
        Case $guib
_pic()
EndSwitch

WEnd
Func _pic()
Local $pic
$count += 1
        If $count > 5 Then $count = 1
Switch $count
Case 1
$pic = $pic1
GUICtrlSetState ( $pic1, 64)
GUICtrlSetState ( $pic1, 16)
GUICtrlSetState ( $pic2, 32)
GUICtrlSetState ( $pic3, 32)
GUICtrlSetState ( $pic4, 32)
GUICtrlSetState ( $pic5, 32)
Case 2
$pic = $pic2
GUICtrlSetState ( $pic2, 64)
GUICtrlSetState ( $pic2, 16)
GUICtrlSetState ( $pic1, 32)
GUICtrlSetState ( $pic3, 32)
GUICtrlSetState ( $pic4, 32)
GUICtrlSetState ( $pic5, 32)
Case 3
$pic = $pic3
GUICtrlSetState ( $pic3, 64)
GUICtrlSetState ( $pic3, 16)
GUICtrlSetState ( $pic1, 32)
GUICtrlSetState ( $pic2, 32)
GUICtrlSetState ( $pic4, 32)
GUICtrlSetState ( $pic5, 32)
Case 4
$pic = $pic4
GUICtrlSetState ( $pic4, 64)
GUICtrlSetState ( $pic4, 16)
GUICtrlSetState ( $pic1, 32)
GUICtrlSetState ( $pic2, 32)
GUICtrlSetState ( $pic3, 32)
GUICtrlSetState ( $pic5, 32)
Case 5
$pic = $pic5
GUICtrlSetState ( $pic5, 64)
GUICtrlSetState ( $pic5, 16)
GUICtrlSetState ( $pic1, 32)
GUICtrlSetState ( $pic2, 32)
GUICtrlSetState ( $pic3, 32)
GUICtrlSetState ( $pic4, 32)
EndSwitch
EndFunc   ;==>_pic()
全部回复 3
www8899

主题: 54

回复: 171

关注: 0

粉丝: 2

TA 的积分
  • 1744
  • 84
  • 0