|
|
本帖最后由 tcpuuu 于 2010-8-23 04:59 编辑
GUICreate(" Win ", 110, 302, 800, 2);A1, 8#代? 第4行與第8行調換,第20改為 Dim $bj = $L2 即可。
$L1 = GUICtrlCreateLabel("1", 2, 2, 62, 36, 0x00800000) ;$WS_BORDER = 0x00800000
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 24)
$L2 = GUICtrlCreateLabel("2", 2, 40, 62, 36, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 24)
$L3 = GUICtrlCreateLabel("3", 2, 78, 62, 36, 0x00800000)
GUICtrlSetBkColor(-1, 0xFF0000)
GUICtrlSetFont(-1, 24)
$L4 = GUICtrlCreateLabel("4", 2, 116, 62, 36, 0x00800000) ;$WS_BORDER = 0x00800000
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 24)
$L5 = GUICtrlCreateLabel("5", 2, 154, 62, 36, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 24)
$L6 = GUICtrlCreateLabel("6", 2, 192, 62, 36, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 24)
$1Button = GUICtrlCreateButton("往下進1格", 65, 1, 40, 30)
$2Button = GUICtrlCreateButton("往上退2格", 65, 31, 40, 30)
$3Button = GUICtrlCreateButton("原地", 65, 62, 40, 30)
GUISetState()
Dim $bj = $L3
Dim $exe[6] = ["1.exe", "2.exe", "3.exe", "4.exe", "5.exe", "6.exe"]
While 1
$msg = GUIGetMsg()
Switch $msg
Case -3
Exit
Case $1Button To $2Button
Go($msg)
Case $3Button
MsgBox(0, 0, $exe[$bj - 3], 1)
;RUN($exe[$bj - 3])
EndSwitch
WEnd
Func Go($msg)
If ($msg = $1Button And $bj = $L6) Or ($msg = $2Button And $bj = $L1) Then Return
GUICtrlSetBkColor($bj, 0xFFFFFF)
$bj += 1
If $msg = $2Button Then $bj -= 2
GUICtrlSetBkColor($bj, 0xFF0000)
MsgBox(0, 0, $exe[$bj - 3], 1)
;RUN($exe[$bj - 3])
EndFunc ;==>Go
======================================================
求助(afan 超级版主) 往上退2格,向下進1格該如何,不循環
如果來到2再退 只能退到1
感謝! |
评分
-
查看全部评分
|