English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
所有分類

希望搭配計時器使表單上的標題能像跑馬燈一樣可以來回走動
可以給我程式碼嗎?

2006-06-01 10:54:38 · 1 個解答 · 發問者 東東是隻狗 2 in 電腦與網際網路 程式設計

1 個解答

'表單置1個TimerDim S As StringPrivate Sub Form_Load()        S = "跑馬燈-跑馬燈-跑馬燈"        Timer1.Interval = 10        Timer1 = TrueEnd SubPrivate Sub Timer1_Timer()        Dim N As Long        Static B As Boolean                N = ScaleWidth        If TextWidth(S) < N And B = False Then           S = " " & S        Else           If InStr(S, " ") Then              B = True              S = Right$(S, Len(S) - 1)           Else              B = False              S = " " & S           End If        End If        Caption = SEnd Sub

2006-06-01 14:38:06 · answer #1 · answered by W.J.S. 7 · 0 0

fedest.com, questions and answers