本帖最后由 水木子 于 2009-12-22 10:39 编辑
找个以前写的列子来回答LZ的问题!
嘿嘿!是不是感觉和LZ说的情况有点像啊?#include <GuiEdit.au3>
#include <WindowsConstants.au3>
#include <ScrollBarConstants.au3>
GUICreate("Form1", 320, 300)
$List1 = GUICtrlCreateEdit("", 10, 10, 300, 200)
$Button1 = GUICtrlCreateButton("向上翻滚", 20, 230, 75, 25, $WS_GROUP)
$Button2 = GUICtrlCreateButton("向下翻滚", 120, 230, 75, 25, $WS_GROUP)
$Button3 = GUICtrlCreateButton("暂停", 220, 230, 75, 25, $WS_GROUP)
GUISetState(@SW_SHOW)
For $i = 1 To 100
_GUICtrlEdit_AppendText($List1 ,$i&@LF)
Next
Send("^{HOME}")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button1
AdlibUnRegister( "xia" )
AdlibRegister('shang' ,100)
Case $Button2
AdlibUnRegister( "shang" )
AdlibRegister('xia' ,100)
Case $Button3
AdlibUnRegister( "shang" )
AdlibUnRegister( "xia" )
EndSwitch
WEnd
Func shang()
_GUICtrlEdit_Scroll($List1, $SB_LINEUP)
EndFunc
Func xia()
_GUICtrlEdit_Scroll($List1, $SB_LINEDOWN)
EndFunc
|