📄 module1.bas
字号:
Attribute VB_Name = "Module1"
Dim passwordflag As Boolean
Declare Function GetTickCount Lib "kernel32" () As Long
Sub timedelay(t As Long)
Dim tt As Long
tt = GetTickCount()
Do
DoEvents
Loop Until GetTickCount() - tt >= t
End Sub
Function waitRS(comm As MSComm, RS As String, DT As Long) As String
Dim buf As String, tt As Long
buf = ""
tt = GetTickCount
Do
buf = buf & comm.Input
Loop Until InStr(1, buf, RS) > 0 Or GetTickCount - tt >= DT
If InStr(1, buf, RS) > 0 Then
waitRS = buf
Else
waitRS = ""
End If
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -