随便写一个不就行了: Option Explicit Dim i As IntegerPrivate Sub Command1_Click() Timer1.Enabled = False End SubPrivate Sub Form_Load() i = 1 Text1 = "" Timer1.Interval = 2000 End SubPrivate Sub Timer1_Timer() Select Case i Case 1 Text1 = "我" i = i + 1 Case 2 Text1 = "爱" i = i + 1 Case Else Text1 = "你" i = 1 End Select End Sub 其中:Timer1为Timer控件
一个标签控件,一个定时器控件Option Explicit Dim i As Long Private Sub Form_Load() i = 0 Timer1.Interval = 2000 Timer1.Enabled = True End SubPrivate Sub Timer1_Timer() i = i + 1 Select Case i Case 1 Label1.Caption = "我" Case 2 Label1.Caption = "爱" Case 3 Label1.Caption = "你" i = 0 End Select End Sub
楼上的,我认为这样写更好 Option Explicit Dim i As IntegerPrivate Sub Form_Load() i = 1 Text1 = "" Timer1.Interval = 2000 End SubPrivate Sub Timer1_Timer() Select Case i Case 1 Text1 = "我" i = i + 1 Case 2 Text1 = Text1 & "爱" i = i + 1 Case 3 Text1 = Text1 & "你" i = i + 1 Case Else Text1 = "" i = 1 End Select End Sub
dim tmpstr as string dim i as bytePrivate Sub Command1_Click() Timer1.Enabled = true End SubPrivate Sub Form_Load() i = 1 Text1 = "" Timer1.Interval = 2000 tmpstr="我爱你" End Subprivate timer1_timer() label1.caption=mid(tmpstr,i,1) i = i + 1 if i>=3 then i=1 end sub
Option Explicit
Dim i As IntegerPrivate Sub Command1_Click()
Timer1.Enabled = False
End SubPrivate Sub Form_Load()
i = 1
Text1 = ""
Timer1.Interval = 2000
End SubPrivate Sub Timer1_Timer()
Select Case i
Case 1
Text1 = "我"
i = i + 1
Case 2
Text1 = "爱"
i = i + 1
Case Else
Text1 = "你"
i = 1
End Select
End Sub
其中:Timer1为Timer控件
Dim i As Long
Private Sub Form_Load()
i = 0
Timer1.Interval = 2000
Timer1.Enabled = True
End SubPrivate Sub Timer1_Timer()
i = i + 1
Select Case i
Case 1
Label1.Caption = "我"
Case 2
Label1.Caption = "爱"
Case 3
Label1.Caption = "你"
i = 0
End Select
End Sub
Option Explicit
Dim i As IntegerPrivate Sub Form_Load()
i = 1
Text1 = ""
Timer1.Interval = 2000
End SubPrivate Sub Timer1_Timer()
Select Case i
Case 1
Text1 = "我"
i = i + 1
Case 2
Text1 = Text1 & "爱"
i = i + 1
Case 3
Text1 = Text1 & "你"
i = i + 1
Case Else
Text1 = ""
i = 1
End Select
End Sub
dim i as bytePrivate Sub Command1_Click()
Timer1.Enabled = true
End SubPrivate Sub Form_Load()
i = 1
Text1 = ""
Timer1.Interval = 2000
tmpstr="我爱你"
End Subprivate timer1_timer()
label1.caption=mid(tmpstr,i,1)
i = i + 1
if i>=3 then i=1
end sub