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

📄 frmphonebook.frm

📁 手机短心控制接收发射程序,通过串口与手机连接,
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmPhoneBook 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "电话簿"
   ClientHeight    =   1695
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5190
   Icon            =   "frmPhoneBook.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1695
   ScaleWidth      =   5190
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command1 
      Caption         =   "确定(&O)"
      Height          =   495
      Left            =   3840
      TabIndex        =   6
      Top             =   480
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出(&E)"
      Height          =   495
      Left            =   3840
      TabIndex        =   5
      Top             =   1080
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Caption         =   "电话簿"
      Height          =   1455
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3375
      Begin VB.TextBox txtTel 
         BackColor       =   &H80000018&
         Height          =   270
         Left            =   720
         MaxLength       =   24
         TabIndex        =   4
         Top             =   915
         Width           =   2415
      End
      Begin VB.TextBox txtName 
         BackColor       =   &H80000018&
         Height          =   270
         Left            =   720
         MaxLength       =   24
         TabIndex        =   1
         Top             =   360
         Width           =   2415
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "电话"
         Height          =   180
         Left            =   240
         TabIndex        =   3
         Top             =   960
         Width           =   360
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "姓名"
         Height          =   180
         Left            =   240
         TabIndex        =   2
         Top             =   405
         Width           =   360
      End
   End
   Begin VB.Label labNO 
      BorderStyle     =   1  'Fixed Single
      Caption         =   "Label2"
      Height          =   255
      Left            =   840
      TabIndex        =   7
      Top             =   2400
      Width           =   1215
   End
End
Attribute VB_Name = "frmPhoneBook"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public phoneBookN0 As Integer
Public phoneBookBook As Integer
Public phoneBookName As Integer

Private Sub Command1_Click()
    Dim i As Integer
    Dim txtTmp As String
    Dim telClassify As String
    
    
    If checkTelNum(Me.txtTel.Text) = False Then
        MsgBox "输入的电话中有无效字符!", vbCritical, "提示"
        Exit Sub
    End If
    
    i = InStr(1, Me.txtTel.Text, "+")
    telClassify = IIf(i > 0, "145", "129")
    
    i = InStr(1, Me.txtTel.Text, "-")
    If i > 0 Then txtTel.Text = Left(txtTel.Text, i - 1) & Right(txtTel.Text, Len(txtTel.Text) - i)
    If IsNumeric(txtTel.Text) = False Then
        MsgBox "输入的电话中有无效字符!", vbCritical, "提示"
        Exit Sub
    End If
    
    Select Case Me.Caption
        Case "新建联系人", "保存联系人"
            txtTmp = "," & Chr(34) & txtTel.Text & Chr(34) & "," & telClassify & "," & Chr(34) & ascConvert(txtName.Text) & Chr(34)
            Call frmMain.rs232("editPhoneBook", 11, , txtTmp)
            Unload Me
        Case "更改联系人"
            txtTmp = labNO.Caption & "," & Chr(34) & txtTel.Text & Chr(34) & "," & telClassify & "," & Chr(34) & ascConvert(txtName.Text) & Chr(34)
            Call frmMain.rs232("editPhoneBook", 10, , txtTmp)
            Unload Me
        Case "删除联系人"
            Call frmMain.rs232("delPhoneBook", 9, Val(labNO.Caption))
            Unload Me
    End Select
    
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

⌨️ 快捷键说明

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