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

📄 frmcaller.frm

📁 来电显示客户管理系统 TAPI 应用MSComm控件
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
Begin VB.Form FrmCaller 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "来电信息"
   ClientHeight    =   6795
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   8970
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6795
   ScaleWidth      =   8970
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   2640
      Top             =   1320
      Visible         =   0   'False
      Width           =   1455
      _ExtentX        =   2566
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      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
      _Version        =   393216
   End
   Begin VB.CommandButton Command2 
      Caption         =   "返   回"
      Height          =   375
      Left            =   6960
      TabIndex        =   15
      Top             =   6120
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "保存来电信息"
      Height          =   375
      Left            =   5280
      TabIndex        =   14
      Top             =   6120
      Width           =   1335
   End
   Begin VB.TextBox Text1 
      Height          =   2895
      Left            =   480
      MultiLine       =   -1  'True
      ScrollBars      =   2  'Vertical
      TabIndex        =   11
      Top             =   2760
      Width           =   8055
   End
   Begin VB.TextBox TxtCall 
      Height          =   285
      Left            =   5640
      TabIndex        =   9
      Text            =   "TxtCall"
      Top             =   720
      Width           =   2295
   End
   Begin VB.TextBox TxtName 
      Height          =   285
      Left            =   1680
      TabIndex        =   7
      Text            =   "TxtName"
      Top             =   720
      Width           =   2295
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   460
      Left            =   480
      TabIndex        =   13
      Top             =   1680
      Width           =   8055
      _ExtentX        =   14208
      _ExtentY        =   820
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      FormatLocked    =   -1  'True
      BeginProperty HeadFont {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
      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
      ColumnCount     =   5
      BeginProperty Column00 
         DataField       =   "Company"
         Caption         =   "单位名称"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   "Mobile"
         Caption         =   "手机"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column02 
         DataField       =   "Phone"
         Caption         =   "电话"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column03 
         DataField       =   "Duty"
         Caption         =   "职务"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column04 
         DataField       =   "Detail"
         Caption         =   "备注"
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
            ColumnWidth     =   1679.811
         EndProperty
         BeginProperty Column01 
         EndProperty
         BeginProperty Column02 
         EndProperty
         BeginProperty Column03 
            ColumnWidth     =   900.284
         EndProperty
         BeginProperty Column04 
            ColumnWidth     =   2129.953
         EndProperty
      EndProperty
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "已存来电人详细信息:"
      Height          =   195
      Left            =   480
      TabIndex        =   12
      Top             =   1320
      Width           =   1800
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "留言:"
      Height          =   195
      Left            =   480
      TabIndex        =   10
      Top             =   2400
      Width           =   540
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "称呼:"
      Height          =   195
      Left            =   4920
      TabIndex        =   8
      Top             =   720
      Width           =   540
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "来电人姓名:"
      Height          =   195
      Left            =   480
      TabIndex        =   6
      Top             =   720
      Width           =   1080
   End
   Begin VB.Label LblNum 
      AutoSize        =   -1  'True
      Caption         =   "LblNum"
      Height          =   195
      Left            =   6720
      TabIndex        =   5
      Top             =   240
      Width           =   540
   End
   Begin VB.Label LblTime 
      AutoSize        =   -1  'True
      Caption         =   "LblTime"
      Height          =   195
      Left            =   4080
      TabIndex        =   4
      Top             =   240
      Width           =   555
   End
   Begin VB.Label LblDate 
      AutoSize        =   -1  'True
      Caption         =   "LblDate"
      Height          =   195
      Left            =   1560
      TabIndex        =   3
      Top             =   240
      Width           =   555
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "来电号码:"
      Height          =   195
      Left            =   5880
      TabIndex        =   2
      Top             =   240
      Width           =   900
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "来电日期:"
      Height          =   195
      Left            =   480
      TabIndex        =   1
      Top             =   240
      Width           =   900
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "来电时间:"
      Height          =   195
      Left            =   3240
      TabIndex        =   0
      Top             =   240
      Width           =   900
   End
End
Attribute VB_Name = "FrmCaller"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public CallDate As String, CallTime As String, Callnum As String

Private Sub Command1_Click()
With MyCaller
.CallDate = CallDate
.CallTime = CallTime
.CallNumber = Callnum
.CallName = Trim(TxtName)
.CallCaller = Trim(TxtCall)
.CallMessag = Trim(Text1)

.Insert

End With

Unload Me

FrmMain.Adodc2.Refresh
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()

CallDate = Year(Date) & "-" & Left(CallDate, 2) & "-" & Right(CallDate, 2)
CallTime = Left(CallTime, 2) & ":" & Right(CallTime, 2)


LblDate.Caption = CallDate
LblTime.Caption = CallTime
LblNum.Caption = Callnum
LoadInfo

End Sub
Private Sub LoadInfo()
Adodc1.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=CallerMIS"
Adodc1.RecordSource = "SELECT * FROM Client where Mobile='" + Callnum + "' or Phone='" + Callnum + "'"
Adodc1.Refresh
Set DataGrid1.DataSource = Adodc1
TxtName.Text = Adodc1.Recordset.Fields("Name")
TxtCall.Text = Adodc1.Recordset.Fields("Caller")
End Sub

⌨️ 快捷键说明

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