vb中等待数秒钟后执行下一语句的方法?
答案:5 悬赏:70 手机版
解决时间 2021-02-25 03:21
- 提问者网友:回忆在搜索
- 2021-02-24 09:36
vb中等待数秒钟后执行下一语句的方法?
最佳答案
- 五星知识达人网友:長槍戰八方
- 2021-02-24 10:37
Do While ExistProcess("ASLUpdate.exe", wait) And i <= 600
Thread.Sleep(1000) : i += 1
If i >= 550 Then wait = False
Loop
Thread.Sleep(1000) : i += 1
If i >= 550 Then wait = False
Loop
全部回答
- 1楼网友:街头电车
- 2021-02-24 13:48
Sleep(2000);休眠2秒
- 2楼网友:愁杀梦里人
- 2021-02-24 13:28
让线程休眠一断时间就行了
- 3楼网友:像个废品
- 2021-02-24 12:42
Private Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)
sleep(5000) '延时五秒
sleep(5000) '延时五秒
- 4楼网友:刀戟声无边
- 2021-02-24 12:09
Public Sub TimeDelay(ByVal PauseSecond As Single)
' Attribute TimeDelay.VB_Description = "延时"
Dim Star, PauseTime
Star = Timer
PauseTime = PauseSecond
Do While Timer < Star + PauseTime
DoEvents
Loop
End SubPrivate Sub Command1_Click()
TimeDelay (5)
MsgBox "出来了"
End Sub
暂停5秒执行下一条语句
' Attribute TimeDelay.VB_Description = "延时"
Dim Star, PauseTime
Star = Timer
PauseTime = PauseSecond
Do While Timer < Star + PauseTime
DoEvents
Loop
End SubPrivate Sub Command1_Click()
TimeDelay (5)
MsgBox "出来了"
End Sub
暂停5秒执行下一条语句
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯