'VB自定义函数-通用型-动态延时-毫秒延时
’ Function为本窗体通用函数调用类型 ys为参数名 cs为参数值 Double8字节双浮点数(时间类型) Boolean逻辑值
Function ys(cs As Double) As Boolean’定义窗口通用函数
ys = False
cs = Val(cs) / 24 / 3600 / 1000 + time ’
Do While cs > time
DoEvents '控制权转让给系统,防止等待时间过长宕机。
Loop
ys = True
End Function
Private Sub Command1_Click()'过程中调用
If ys(Text1.Text) = True Then MsgBox “延时时间到” ’
End Sub
VB简单易懂通用型自定义毫秒延时调用想要所有窗口调用复制到模块内
最新推荐文章于 2022-03-19 15:09:17 发布