Dim i As Integer
Private Sub Command1_Click()
If Command1.Caption = "开始" Then
Timer1.Enabled = True
Command1.Caption = "停止"
Else
Timer1.Enabled = False
Command1.Caption = "开始"
End If
End Sub
Private Sub Form_Load()
i = 1
Text1 = i
Timer1.Enabled = False
Timer1.Interval = 300
Command1.Caption = "开始"
End Sub
Private Sub Timer1_Timer()
i = i + 1
Text1 = i
End Sub
三个控件:按钮、文本框,计时器
for i=1 to 100
text1.seltext=space(1) & i
next i
Dim i As Integer
Private Sub Timer1_Timer()
i = i + 1
Text1.Text = Text1.Text & i & " "
End Sub