教我个时间延迟
时间延迟,自动读取Text1中的每一行数据 并停留一段时间
Option Explicit
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
Dim n() As String
Dim i As Byte
Command1.Enabled = False
n() = Split(Text1.Text, vbCrLf, -1)
For i = 0 To UBound(n)
DoEvents
Print n(i)
Call Sleep(1000)
Next
Timer1.Enabled = True
End Sub
Private Sub Form_Load()
Text1.Text = "请看这个例子," & vbCrLf _
& "看看是不是你想要的效果." & vbCrLf _
& "如果不是,请重新留言." & vbCrLf _
& "制作人:梁嘉辉(purana)"
End Sub
Private Sub Timer1_Timer()
Command1.Enabled = True
Timer1.Enabled = False
End Sub
如果重复按显示就会乱,我加了两句就不会出现那种情况了.不知道是不是你想要的