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

📄 form1.frm

📁 电话的程序 可视化 可以实现通话 有兴趣
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         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 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.TextBox Text3 
      Alignment       =   2  'Center
      DataField       =   "忙闲状态"
      DataSource      =   "Adodc1"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   10920
      Locked          =   -1  'True
      TabIndex        =   5
      Top             =   120
      Width           =   1095
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   7080
      Top             =   5880
      Width           =   2295
      _ExtentX        =   4048
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=telexchange"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "telexchange"
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from usertable"
      Caption         =   "usertable1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.TextBox Text2 
      Alignment       =   2  'Center
      Enabled         =   0   'False
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   6360
      Locked          =   -1  'True
      TabIndex        =   3
      Top             =   120
      Width           =   3135
   End
   Begin VB.TextBox Text1 
      Alignment       =   2  'Center
      Enabled         =   0   'False
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1440
      Locked          =   -1  'True
      TabIndex        =   1
      Top             =   120
      Width           =   3135
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "忙闲"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   10080
      TabIndex        =   4
      Top             =   180
      Width           =   570
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "被叫号码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   5040
      TabIndex        =   2
      Top             =   180
      Width           =   1140
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "主叫号码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   240
      TabIndex        =   0
      Top             =   180
      Width           =   1140
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Private Sub connect_Change()
If connect.Text = "y" Then
    Adodc2.Recordset.AddNew
    Adodc2.Recordset.Fields("主叫电话号码") = Text1.Text
    Adodc2.Recordset.Fields("被叫电话号码") = Text2.Text
    Adodc2.Recordset.Fields("开始时间") = Now
ElseIf connect.Text = "n" Then
    Adodc2.Recordset.Fields("结束时间") = Now
    Adodc2.Recordset.Fields("通话时长") = Now - Adodc2.Recordset.Fields("开始时间")
    Adodc2.Recordset.Fields("费用") = Adodc2.Recordset.Fields("通话时长") * 0.1
    Adodc2.Recordset.Update
    Adodc2.Refresh
    Text1.Text = ""
    Text2.Text = ""
    connect.Text = ""
End If
End Sub


Private Sub Form_Load()
Form2.Show
Form3.Show
allowdial = 1
End Sub

Private Sub inport_Change()
If inport.Text <> "!" Then
    Adodc3.RecordSource = "select * from usertable where 端口='" & inport.Text & "'"
    Adodc3.Refresh
    Text1.Text = Adodc3.Recordset.Fields("电话号码")
ElseIf inport.Text = "!" Then
    Text1.Text = ""
    Text2.Text = ""
End If
End Sub




Private Sub outport_Change()
Select Case outport.Text
Case "2"
    Form2.ring = "y"
Case "3"
    Form3.ring = "y"
End Select
End Sub


Private Sub Text2_Change()
Adodc1.RecordSource = "select * from usertable where 电话号码 like '" & Text2.Text & "%'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 1 Then
    If Text2.Text = Adodc1.Recordset.Fields("电话号码") Then
        allowdial = 0
        outport = Adodc1.Recordset.Fields("端口")
    End If
End If
End Sub

⌨️ 快捷键说明

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