本帖最后由 tcpuuu 于 2010-9-6 14:19 编辑
GUICreate(" Win ", 110, 302, 800, 2)
$L1 = GUICtrlCreateLabel("1", 2, 2, 62, 36, 0x00800000) ;$WS_BORDER = 0x00800000
GUICtrlSetBkColor(-1, 0xFF0000)
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, 0xFFFFFF)
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格", 1, 232, 60, 30)
$2Button = GUICtrlCreateButton("停在原地", 1, 266, 60, 30)
;--------------------------------------
GUICtrlCreateInput ( "", 68, 8, 30, 20)
GUICtrlCreateInput ( "", 68, 46, 30, 20)
GUICtrlCreateInput ( "", 68, 84, 30, 20)
GUICtrlCreateInput ( "", 68,122, 30, 20)
GUICtrlCreateInput ( "", 68,160, 30, 20)
GUICtrlCreateInput ( "", 68,198, 30, 20)
$3Button = GUICtrlCreateButton("計算", 68, 220, 30, 20)
GUICtrlCreateInput ( "", 68,242, 30, 20)
$4Button = GUICtrlCreateButton("執行", 63, 266, 40, 30)
GUISetState()
Dim $bj = $L1
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
Go($msg)
Case $2Button
MsgBox(0, 0, $exe[$bj - 3], 1)
;RUN($exe[$bj - 3])
EndSwitch
WEnd
Func Go($msg)
If ($msg = $1Button And $bj = $L6) Then Return
GUICtrlSetBkColor($bj, 0xFFFFFF)
$bj += 1
GUICtrlSetBkColor($bj, 0xFF0000)
MsgBox(0, 0, $exe[$bj - 3], 1)
;RUN($exe[$bj - 3])
EndFunc ;==>Go |