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

📄 frmdial.frm

📁 这是一本学习串口编程喝计算机监控的好书里面是用VB开发的源代码
💻 FRM
📖 第 1 页 / 共 4 页
字号:
      _Version        =   393216
   End
   Begin VB.Timer tComm 
      Enabled         =   0   'False
      Interval        =   500
      Left            =   4320
      Top             =   360
   End
   Begin VB.CommandButton cmdIn 
      Caption         =   "In"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   5040
      TabIndex        =   22
      Top             =   4320
      Width           =   375
   End
   Begin ComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   315
      Left            =   0
      TabIndex        =   21
      Top             =   4680
      Width           =   8310
      _ExtentX        =   14658
      _ExtentY        =   556
      SimpleText      =   ""
      _Version        =   327682
      BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} 
         NumPanels       =   5
         BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Object.Width           =   7761
            MinWidth        =   7761
            Text            =   "Idle"
            TextSave        =   "Idle"
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
         BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Style           =   6
            Alignment       =   1
            Object.Width           =   2364
            MinWidth        =   2364
            TextSave        =   "2006-8-21"
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
         BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Alignment       =   1
            Object.Width           =   2469
            MinWidth        =   2469
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
         BeginProperty Panel4 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Style           =   5
            Alignment       =   1
            Object.Width           =   1306
            MinWidth        =   1306
            TextSave        =   "15:35"
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
         BeginProperty Panel5 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Alignment       =   1
            Object.Width           =   617
            MinWidth        =   617
            Text            =   "N"
            TextSave        =   "N"
            Key             =   ""
            Object.Tag             =   ""
         EndProperty
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
   Begin MSCommLib.MSComm MSComm1 
      Left            =   3720
      Top             =   240
      _ExtentX        =   1005
      _ExtentY        =   1005
      _Version        =   393216
      CommPort        =   3
      DTREnable       =   0   'False
      InBufferSize    =   512
      OutBufferSize   =   128
      RThreshold      =   1
      SThreshold      =   1
      InputMode       =   1
   End
   Begin VB.CheckBox chkPhone 
      Alignment       =   1  'Right Justify
      Caption         =   "Phone"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   300
      Left            =   0
      TabIndex        =   3
      Top             =   4440
      Width           =   1130
   End
   Begin VB.CheckBox chkCard1 
      Height          =   255
      Left            =   120
      TabIndex        =   20
      Top             =   240
      Width           =   255
   End
   Begin VB.CheckBox chkCard2 
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   720
      Width           =   255
   End
   Begin VB.ComboBox comboCard2 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      Left            =   1130
      TabIndex        =   7
      Top             =   600
      Width           =   1455
   End
   Begin VB.TextBox txtPassword2 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   7230
      PasswordChar    =   "*"
      TabIndex        =   9
      Top             =   600
      Width           =   945
   End
   Begin VB.ComboBox comboAccount2 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      Left            =   3645
      TabIndex        =   8
      Top             =   600
      Width           =   2295
   End
   Begin VB.ComboBox comboAccount1 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      Left            =   3645
      TabIndex        =   5
      Top             =   120
      Width           =   2295
   End
   Begin VB.TextBox txtPassword1 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   7230
      PasswordChar    =   "*"
      TabIndex        =   6
      Top             =   120
      Width           =   945
   End
   Begin VB.ComboBox comboCard1 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      Left            =   1130
      TabIndex        =   4
      Top             =   120
      Width           =   1455
   End
   Begin VB.Shape shpSignal 
      FillColor       =   &H80000008&
      FillStyle       =   0  'Solid
      Height          =   255
      Left            =   6240
      Shape           =   3  'Circle
      Top             =   4380
      Width           =   255
   End
   Begin VB.Label lblOrderID 
      Alignment       =   1  'Right Justify
      Caption         =   "Card2"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   19
      Top             =   720
      Width           =   735
   End
   Begin VB.Label lblAccount2 
      Alignment       =   1  'Right Justify
      Caption         =   "Account"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2640
      TabIndex        =   18
      Top             =   720
      Width           =   975
   End
   Begin VB.Label lblPassword2 
      Alignment       =   1  'Right Justify
      Caption         =   "Password"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   6000
      TabIndex        =   17
      Top             =   720
      Width           =   1095
   End
   Begin VB.Label lblPassword1 
      Alignment       =   1  'Right Justify
      Caption         =   "Password"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   6000
      TabIndex        =   16
      Top             =   240
      Width           =   1095
   End
   Begin VB.Label lblRecordIn 
      Alignment       =   1  'Right Justify
      Caption         =   "Account"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2640
      TabIndex        =   15
      Top             =   240
      Width           =   975
   End
   Begin VB.Label lblEnlargeID 
      Alignment       =   1  'Right Justify
      Caption         =   "Card1"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   14
      Top             =   240
      Width           =   735
   End
   Begin VB.Menu mPopupSys 
      Caption         =   "SysTray"
      Visible         =   0   'False
      Begin VB.Menu mPopMiniTool 
         Caption         =   "&MiniTool"
      End
      Begin VB.Menu mPopSound 
         Caption         =   "&Sound"
      End
      Begin VB.Menu mPopExit 
         Caption         =   "&Exit"
      End
   End
End
Attribute VB_Name = "frmDial"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim nFocusNo As Integer
Dim nTestNo As Integer
Dim strStatusBar As String

Private Sub Initialize()
  Dim strTmp As String
  Dim strVal As String
  Dim strFile As String
  Dim strPart(1) As String
  Dim I As Integer
  Dim J As Integer
  On Error Resume Next
  
    strDataPath = App.Path + "\PhoneBook.mdb"
  If CheckFile(strDataPath) = False Then
    MsgBox "Cannot find the PhoneBook !", vbCritical + vbOKOnly
    Unload Me
    Exit Sub
  End If
  
  strPart(0) = "&"
  strPart(1) = "$"
  
  If (CheckFile(App.Path & "\Card1.txt") = True) Then
    strFile = ReadTxtFile(App.Path + "\Card1.txt")
    '&Card1/Card2/&$Account1/Account2/$
    
    For I = 0 To 1
      strTmp = GetInsideString(strFile, strPart(I))
      J = 0
      strVal = "1"
      
      If strTmp <> "" Then
        Select Case I
          Case 0
            Do While strVal <> ""
              strVal = GetNoString(strTmp, "/", J)
              If strVal <> "" Then comboCard1.AddItem strVal
              J = J + 1
            Loop
            comboCard1.AddItem "-"
          Case 1
            Do While strVal <> ""
              strVal = GetNoString(strTmp, "/", J)
              If strVal <> "" Then comboAccount1.AddItem strVal
              J = J + 1
            Loop
            comboAccount1.AddItem "-"
        End Select
      End If
    Next I
    If comboCard1.ListCount > 0 Then comboCard1.ListIndex = 0
    If comboAccount1.ListCount > 0 Then comboAccount1.ListIndex = 0
  End If
  
  strFile = ""
  If (CheckFile(App.Path & "\Card2.txt") = True) Then
    strFile = ReadTxtFile(App.Path + "\Card2.txt")
    '&Card1/Card2/&$Account1/Account2/$
    
    For I = 0 To 1
      strTmp = GetInsideString(strFile, strPart(I))
      J = 0
      strVal = "1"
      
      If strTmp <> "" Then
        Select Case I
          Case 0
            Do While strVal <> ""
              strVal = GetNoString(strTmp, "/", J)
              If strVal <> "" Then comboCard2.AddItem strVal
              J = J + 1
            Loop
            comboCard2.AddItem "-"
          Case 1
            Do While strVal <> ""
              strVal = GetNoString(strTmp, "/", J)
              If strVal <> "" Then comboAccount2.AddItem strVal
              J = J + 1
            Loop
            comboAccount2.AddItem "-"
        End Select
      End If
    Next I
    If comboCard2.ListCount > 0 Then comboCard2.ListIndex = 0
    If comboAccount2.ListCount > 0 Then comboAccount2.ListIndex = 0
  End If
End Sub

Private Sub ShowReceive()
    With frmReceive
        .StatusBar1.Panels(1).Text = nRecTimes
        .StatusBar1.Panels(2).Text = strStartTime
        .StatusBar1.Panels(3).Text = strPhoneNo + "(" + Trim(Str(nRingTimes)) + ")"
        .lblTime.Caption = strRingTime
        .Show
        
        If .WindowState = vbMinimized Then
            .WindowState = vbNormal

⌨️ 快捷键说明

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