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

📄 main.bas

📁 这是一本学习串口编程喝计算机监控的好书里面是用VB开发的源代码
💻 BAS
字号:
Attribute VB_Name = "Main"
Option Explicit
Public strDataPath As String
Public strDial As String

Public Const ICON_OFF = 0
Public Const ICON_ON = 1

Public nStatus As Integer
Public Const STATUS_IDLE = 0
Public Const STATUS_TEST = 1
Public Const STATUS_DIAL = 2
Public Const STATUS_IN = 3        'listen the call in
Public Const STATUS_NOW = 4       'off hook

Public nGridShow As Integer
Public Const SHOW_PHONEBOOK = 0
Public Const SHOW_CALLIN = 1

Public Const COMMON_INTERVAL = 500
Public Const DIAL_STATUS_INTERVAL = 800
Public Const RING_INTERVAL = 7000

Public Const PORT_NUM = 8

Public bStartComm As Boolean
Public strInBuffers As String
Public nSound As Integer

'For display in frmReceive
Public strStartTime As String
Public strRingTime As String
Public nRingTimes As Integer
Public nRecTimes As Integer
Public strPhoneNo As String            'for caller ID
Public strStartCallTime As String

Public Function CheckPhone(ByVal strSource As String) As String
  Dim strTmpNo As String
  
  strTmpNo = Trim(strSource)
  If InStr(1, strTmpNo, "=") <> 0 Then
    strTmpNo = GetNoString(strTmpNo + "=", "=", 1)
    strTmpNo = Trim(strTmpNo)
  End If
        
  If Len(strTmpNo) >= 6 And CheckLegalChars(strTmpNo, "0123456789-,") Then
    'Caller ID
    CheckPhone = strTmpNo
  End If
End Function

⌨️ 快捷键说明

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