tcpuuu 发表于 2011-5-18 05:20:35

求助 紅色內的數字(謝謝 guland版主解答)(已解決)

本帖最后由 tcpuuu 于 2011-5-18 09:21 编辑



求助 紅色上下跑再把紅色內的數字寫入 edit1
這該如何做?
請各位高手解答   非常感謝GUICreate(" Win ", 200, 480, 810, 0)
GUICreate("EXCEL", 200, 480, 810, 0)
;右;上


EndSwitch
WEnd

guland 发表于 2011-5-18 08:58:51

回复 1# tcpuuu

修改了 111行和118行GUICreate(" Win ", 200, 480, 810, 0)
GUICreate("EXCEL", 200, 480, 810, 0)
;右;上

$1Button = GUICtrlCreateButton("1",16,2,30,20)
$2Button = GUICtrlCreateButton("2",50,2,30,20)
$3Button = GUICtrlCreateButton("3",84,2,30,20)
$4Button = GUICtrlCreateButton("4",118,2,30,20)
$5Button = GUICtrlCreateButton("5",152,2,30,20)

$n1 = GUICtrlCreateInput("",62,62,36,36)


GUICtrlCreateLabel(" 1 ", 2,30,14,12)
GUICtrlCreateLabel(" 2 ", 2,54,14,12)
GUICtrlCreateLabel(" 3 ", 2,78,14,12)
GUICtrlCreateLabel(" 4 ", 2,102,14,12)
GUICtrlCreateLabel(" 5 ", 2,126,14,12)
GUICtrlCreateLabel(" 6 ", 2,150,14,12)
GUICtrlCreateLabel(" 7 ", 2,174,14,12)
GUICtrlCreateLabel(" 8 ", 2,198,14,12)
GUICtrlCreateLabel(" 9 ", 2,222,14,12)
GUICtrlCreateLabel("10", 2,246,14,12)
GUICtrlCreateLabel("11", 2,270,14,12)
GUICtrlCreateLabel("12", 2,294,14,12)
GUICtrlCreateLabel("13", 2,318,14,12)
GUICtrlCreateLabel("14", 2,342,14,12)
GUICtrlCreateLabel("15", 2,366,14,12)
GUICtrlCreateLabel("16", 2,390,14,12)

$L1 = GUICtrlCreateLabel("5", 16,26, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L2 = GUICtrlCreateLabel("4", 16,50, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L3 = GUICtrlCreateLabel("4", 16,74, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L4 = GUICtrlCreateLabel("3", 16,98, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L5 = GUICtrlCreateLabel("3", 16,122, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L6 = GUICtrlCreateLabel("3", 16,146, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L7 = GUICtrlCreateLabel("2", 16,170, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L8 = GUICtrlCreateLabel("2", 16,194, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L9 = GUICtrlCreateLabel("2", 16,218, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L10 = GUICtrlCreateLabel("2", 16,242, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L11 = GUICtrlCreateLabel("1", 16,266, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L12 = GUICtrlCreateLabel("1", 16,290, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L13 = GUICtrlCreateLabel("1", 16,314, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L14 = GUICtrlCreateLabel("1", 16,338, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFF0000)
GUICtrlSetFont(-1, 12)

$L15 = GUICtrlCreateLabel("1", 16,362, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$L16 = GUICtrlCreateLabel("1", 16,386, 28, 20, 0x00800000)
GUICtrlSetBkColor(-1, 0xFFFFFF)
GUICtrlSetFont(-1, 12)

$10Button = GUICtrlCreateButton("down", 16,410, 32,22)
$20Button = GUICtrlCreateButton("up",16,434, 32,22)

GUISetState()

$bj = $L14;從L14開始
While 1
      $msg = GUIGetMsg()
      Switch $msg
                Case -3
                        Exit
Case $10Button
If $bj = $L16 Then ContinueLoop
GUICtrlSetBkColor($bj, 0xFFFFFF)
$bj += 1
GUICtrlSetBkColor($bj, 0xFF0000)
GUICtrlSetData($n1,GUICtrlRead($bj))         

Case $20Button
If $bj = $L1 Then ContinueLoop
GUICtrlSetBkColor($bj, 0xFFFFFF)
$bj -= 1
GUICtrlSetBkColor($bj, 0xFF0000)
GUICtrlSetData($n1,GUICtrlRead($bj))

EndSwitch
WEnd

tcpuuu 发表于 2011-5-18 09:19:33

嗯!   謝謝guland版主 解答
我想好久

我的問題已解決
页: [1]
查看完整版本: 求助 紅色內的數字(謝謝 guland版主解答)(已解決)