main.bas

来自「监控类的开发」· BAS 代码 · 共 52 行

BAS
52
字号
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 + =
减小字号Ctrl + -
显示快捷键?