81103283 发表于 2009-4-8 08:08:50

如何让下拉条保持最下?(有源码和图片)

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 356, 218, -1, -1)
$Edit1 = GUICtrlCreateEdit("", 16, 16, 321, 129)
GUICtrlSetData(-1, "Edit1")
$Button1 = GUICtrlCreateButton("显示时间", 80, 168, 75, 25, 0)
$Button2 = GUICtrlCreateButton("退出", 200, 168, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
      Case $Button1
                        Timer()
                Case $Button2
                        Exit
        EndSwitch
WEnd

Func Timer()
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
EndFunc

Func Addlog ($lcStr)
        GUICtrlSetData($Edit1, GUICtrlRead ($Edit1)&@CRLF&$lcStr)
EndFunc

[ 本帖最后由 81103283 于 2009-4-8 08:49 编辑 ]

techbytnt 发表于 2009-4-8 08:46:41

问题决绝

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 356, 218, -1, -1)
$Edit1 = GUICtrlCreateEdit("", 16, 16, 321, 129)
GUICtrlSetData(-1, "Edit1")
$Button1 = GUICtrlCreateButton("显示时间", 80, 168, 75, 25, 0)
$Button2 = GUICtrlCreateButton("退出", 200, 168, 75, 25, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
      Case $Button1
                        Timer()
                Case $Button2
                        Exit
        EndSwitch
WEnd

Func Timer()
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
        Sleep(1000)
        Addlog(@HOUR&"时"&@MIN&"分"&@SEC&"秒")
EndFunc

Func Addlog ($lcStr)
GUICtrlSetData($Edit1,GUICtrlRead($Edit1)&@CRLF&$lcStr)       
GUICtrlSetData($Edit1," ",True)
EndFunc

81103283 发表于 2009-4-8 08:49:41

谢谢了:face (29):
页: [1]
查看完整版本: 如何让下拉条保持最下?(有源码和图片)