DoEvents+Sleep 使用=Timer

来源:互联网 发布:北京奥运会赔钱知乎 编辑:程序博客网 时间:2024/06/16 12:55

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub Command1_Click()
i = 0
Do While i < 3000
  DoEvents: Sleep 1
  i = i + 1
Loop
Label1.Caption = "OK"
End Sub
 

原创粉丝点击