'简单例子
Dim i As Integer
Dim strCaption As String
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
i = 0
Timer1.Enabled = False
Timer1.Interval = 100
strCaption = Form1.Caption
End Sub
Private Sub Timer1_Timer()
i = i + 1
Dim j As Integer
strspace = Space(i)
Form1.Caption = strspace & Form1.Caption
If i > 20 Then
i = 0
Form1.Caption = strCaption
End If
End Sub
测试通过
Private Sub Command1_Click()
If Timer1.Enabled = False Then
Timer1.Enabled = True
Else
Timer1.Enabled = False
End If
End Sub
Private Sub Form_Load()
Timer1.Interval = 500
Form1.Caption = Space(90) & "欢迎使用本系统"
Form1.WindowState = 2
End Sub
Private Sub Timer1_Timer()
Form1.Caption = Mid(Form1.Caption, 5, Len(Form1.Caption))
If Len(Form1.Caption) = 0 Then
Form1.Caption = Space(90) & "欢迎使用本系统"
End If
End Sub