VB – 类似timer暂停功能的函数

Public Declare Function GetTickCount Lib "kernel32" () As Long
Sub Pause(MS As Long)
'pretty simple first I set start as the
' starting time when the function runs
Dim start
start = GetTickCount
'here we wait until the start time plus
' however long I told it to wait is not gr
' eater than the current time
While start + MS > GetTickCount
DoEvents
Wend
'then we exit
End Sub

转载请注明 :IT樵客

此条目发表在 程序设计 分类目录。将固定链接加入收藏夹。

关于 logger

2010年网络规划设计师证书寻挂靠!

发表评论

电子邮件地址不会被公开。 必填项已用 * 标注

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>