timeGetTime函数
函数功能:该函数得到定时器的当前值。timeGetTime返回值的单位是1ms
函数原型:Public Declare Function timeGetTime Lib "winmm.dll" () As Long
例如:实现延时
- Public Declare Function timeGetTime Lib "winmm.dll" () As Long
- Public Sub Delay(ByVal num As Integer)
- Dim t As Long
- t = timeGetTime
- Do Until timeGetTime - t >= num
- DoEvents
- Loop
- End Sub
复制代码