⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wait.bas

📁 一款基于VB的红外遥控系统
💻 BAS
字号:
Attribute VB_Name = "Pause"
'**************************************
'Windows API/Global Declarations for :A
'     simple Wait Function
'**************************************

Public Declare Function GetTickCount Lib "kernel32.dll" () As Long
'the api for detecting keys pressed or scan coded
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer

Public Function Wait(ByVal TimeToWait As Long) 'Time in seconds
    Dim EndTime As Long
    
    EndTime = GetTickCount + TimeToWait / 1 '* 1000 Cause u give seconds and GetTickCount uses Milliseconds

    Do Until GetTickCount > EndTime

        DoEvents
        
    Loop
        
End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -