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

📄 frmmain.frm

📁 使用modem实现的来电显示程序,可以用参考串口编程
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{648A5603-2C6E-101B-82B6-000000000014}#1.1#0"; "MSCOMM32.OCX"
Begin VB.Form frmMain 
   BorderStyle     =   0  'None
   Caption         =   "来电显示器"
   ClientHeight    =   3510
   ClientLeft      =   6375
   ClientTop       =   3645
   ClientWidth     =   4500
   Icon            =   "frmMain.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmMain.frx":030A
   ScaleHeight     =   234
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   300
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox RcvText 
      BackColor       =   &H00404040&
      CausesValidation=   0   'False
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00C0C0C0&
      Height          =   2295
      Left            =   75
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   0
      Top             =   750
      Visible         =   0   'False
      Width           =   4350
   End
   Begin VB.TextBox brDay 
      Alignment       =   2  'Center
      BackColor       =   &H00404040&
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00E0E0E0&
      Height          =   315
      Left            =   990
      TabIndex        =   13
      Text            =   "2001-07-28"
      Top             =   2730
      Width           =   1350
   End
   Begin Project1.btn Power 
      Height          =   300
      Left            =   45
      TabIndex        =   4
      Top             =   420
      Width           =   330
      _ExtentX        =   582
      _ExtentY        =   529
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      UpPicture       =   "frmMain.frx":252F
      DownPicture     =   "frmMain.frx":26BD
      DisablePicture  =   "frmMain.frx":284B
      Style           =   1
   End
   Begin VB.ListBox lstCID 
      Appearance      =   0  'Flat
      BackColor       =   &H00404040&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000004&
      Height          =   1920
      ItemData        =   "frmMain.frx":29D9
      Left            =   90
      List            =   "frmMain.frx":29DB
      TabIndex        =   1
      Top             =   765
      Width           =   4320
   End
   Begin VB.Timer Timer1 
      Interval        =   300
      Left            =   5985
      Top             =   255
   End
   Begin VB.ComboBox cboMODEM 
      Appearance      =   0  'Flat
      BackColor       =   &H80000007&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00808080&
      Height          =   300
      ItemData        =   "frmMain.frx":29DD
      Left            =   390
      List            =   "frmMain.frx":29DF
      Style           =   2  'Dropdown List
      TabIndex        =   2
      Top             =   435
      Width           =   3330
   End
   Begin MSCommLib.MSComm comm 
      Left            =   7200
      Top             =   1335
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      DTREnable       =   -1  'True
      RThreshold      =   1
      SThreshold      =   1
   End
   Begin Project1.btn brPrev 
      Height          =   300
      Left            =   2445
      TabIndex        =   5
      Top             =   2715
      Width           =   330
      _ExtentX        =   582
      _ExtentY        =   529
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      UpPicture       =   "frmMain.frx":29E1
      DownPicture     =   "frmMain.frx":2B6F
   End
   Begin Project1.btn brNext 
      Height          =   300
      Left            =   3495
      TabIndex        =   6
      Top             =   2715
      Width           =   330
      _ExtentX        =   582
      _ExtentY        =   529
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      UpPicture       =   "frmMain.frx":2CFD
      DownPicture     =   "frmMain.frx":2E8B
      DisablePicture  =   "frmMain.frx":3019
   End
   Begin Project1.btn btnClose 
      Height          =   150
      Left            =   4215
      TabIndex        =   7
      Top             =   135
      Width           =   210
      _ExtentX        =   370
      _ExtentY        =   265
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      UpPicture       =   "frmMain.frx":31A7
      DownPicture     =   "frmMain.frx":3289
   End
   Begin Project1.btn brToday 
      Height          =   300
      Left            =   75
      TabIndex        =   8
      Top             =   2715
      Width           =   330
      _ExtentX        =   582
      _ExtentY        =   529
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      UpPicture       =   "frmMain.frx":336B
      DownPicture     =   "frmMain.frx":34F9
   End
   Begin Project1.btn btnPull 
      Height          =   150
      Left            =   3765
      TabIndex        =   9
      Top             =   135
      Width           =   210
      _ExtentX        =   370
      _ExtentY        =   265
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      UpPicture       =   "frmMain.frx":3687
      DownPicture     =   "frmMain.frx":3769
      Style           =   1
      Value           =   1
   End
   Begin Project1.btn btn5 
      Height          =   150
      Left            =   4020
      TabIndex        =   10
      Top             =   135
      Width           =   210
      _ExtentX        =   370
      _ExtentY        =   265
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      UpPicture       =   "frmMain.frx":384B
      DownPicture     =   "frmMain.frx":392D
   End
   Begin Project1.btn btnRcd 
      Height          =   300
      Left            =   3765
      TabIndex        =   11
      Top             =   420
      Width           =   330
      _ExtentX        =   582
      _ExtentY        =   529
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      UpPicture       =   "frmMain.frx":3A0F
      DownPicture     =   "frmMain.frx":3B9D
      DisablePicture  =   "frmMain.frx":3D2B
      Style           =   1
      Value           =   1
   End
   Begin Project1.btn btnMdm 
      Height          =   300
      Left            =   4095
      TabIndex        =   12
      Top             =   420
      Width           =   330
      _ExtentX        =   582
      _ExtentY        =   529
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      UpPicture       =   "frmMain.frx":3EB9
      DownPicture     =   "frmMain.frx":4047
      DisablePicture  =   "frmMain.frx":41D5
      Style           =   1
   End
   Begin VB.Label lblTip 
      Appearance      =   0  'Flat
      BackColor       =   &H80000007&
      BackStyle       =   0  'Transparent
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000005&
      Height          =   225
      Left            =   75
      TabIndex        =   3
      Top             =   3150
      Width           =   4350
   End
   Begin VB.Shape shpBorder 
      Height          =   3480
      Left            =   0
      Top             =   0
      Width           =   4500
   End
   Begin VB.Image imgTitle 
      Height          =   300
      Left            =   60
      Picture         =   "frmMain.frx":4363
      Top             =   60
      Width           =   1575
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private sKey()  As String
Private Const mKey = "System\CurrentControlSet\Services\Class\Modem\"
Private InBuf   As String
Private Tip     As String
Private EnableCallerID  As String
Private InitSetting     As String
Private tDCB    As DCB
Private PORTNAME   As String
Private rDate   As String
Private rTime   As String
Private rCallerID    As String
Private SDATE   As String
Private STIME   As String
Private Sub CommOutput(Data As String)
    comm.Output = Data
    Sleep 50
    Do While comm.OutBufferCount > 0
    Loop
End Sub
Private Sub QueryCID(brDay As String)
Dim ds1 As Long
Dim ds2 As Long
    ds1 = DateDiff("d", "1899/12/29", brDay) - 1
    ds2 = DateDiff("d", "1899/12/29", brDay)
    If adoCn.State = 0 Then Exit Sub
    '
    'brDay = DateAdd("d", -37098, "2001-07-25")
    GetRecordSet "select * from idlist where datetime>=" & ds1 & " and datetime<" & ds2, _
                 adoSet, , adCmdText, adLockReadOnly
    lstCID.Clear
    
    Do While Not adoSet.EOF
        ds1 = adoSet(0)
        lstCID.AddItem Format(lstCID.ListCount + 1, "000.") & "[" & Format(adoSet(0), "yyyy/mm/dd hh:mm") & "] " & adoSet(1)
        adoSet.MoveNext
    Loop

⌨️ 快捷键说明

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