本帖最后由 飘云 于 2010-12-17 19:14 编辑
回复 1# zz999
我想你要的是这种效果吧?
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1_1 = GUICreate("Form1", 593, 152, -1, -1)
$Label1 = GUICtrlCreateLabel("我们都是共产主义接班人", 100, 40, 136, 17,$SS_LEFTNOWORDWRAP)
$discov1 = GUICtrlCreateLabel("", 40, 40, 60, 17)
GUICtrlSetBkColor (-1,0xF0F0F0)
$discov2 = GUICtrlCreateLabel("", 200, 40, 50, 17)
GUICtrlSetBkColor (-1,0xF0F0F0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
Dim $setup=1
AdlibRegister("yidong",50)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func yidong()
$pos = ControlGetPos($Form1_1,"",$Label1)
Select
Case $pos[0]>66 And $setup=1
GUICtrlSetPos($Label1,$pos[0]-1,$pos[1])
Case $pos[0]<100 And $setup=-1
GUICtrlSetPos($Label1,$pos[0]+1,$pos[1])
Case $pos[0]=66 Or $pos[0]=100
$setup *= -1
EndSelect
EndFunc
|