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

📄 form1.frm

📁 又一个来电显示程序
💻 FRM
字号:
VERSION 5.00
Object = "{15A5F3A7-E734-11D4-BB0F-B55854F2C92D}#1.0#0"; "VOICEANGELPRO2.OCX"
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 Form1 
   BorderStyle     =   4  'Fixed ToolWindow
   Caption         =   "语音来点显示器"
   ClientHeight    =   3165
   ClientLeft      =   45
   ClientTop       =   270
   ClientWidth     =   5325
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3165
   ScaleWidth      =   5325
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "Command2"
      Height          =   180
      Left            =   60
      TabIndex        =   6
      Top             =   300
      Width           =   615
   End
   Begin VB.CommandButton Command1 
      Caption         =   "删除"
      Height          =   375
      Left            =   4620
      TabIndex        =   4
      Top             =   480
      Width           =   615
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "Form1.frx":0000
      Height          =   1815
      Left            =   0
      TabIndex        =   3
      Top             =   960
      Width           =   5265
      _ExtentX        =   9287
      _ExtentY        =   3201
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         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       =   ""
         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 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Ado 
      Align           =   2  'Align Bottom
      Height          =   330
      Left            =   0
      Top             =   2835
      Width           =   5325
      _ExtentX        =   9393
      _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         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=ldxs.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=ldxs.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from ldxs"
      Caption         =   "Ado控件"
      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 Text1 
      Height          =   315
      Left            =   900
      TabIndex        =   1
      Top             =   480
      Width           =   1395
   End
   Begin VOICEANGELLib.VoiceAngel VoiceAngel 
      Height          =   555
      Left            =   2460
      TabIndex        =   0
      Top             =   300
      Width           =   2055
      _Version        =   65536
      _ExtentX        =   3625
      _ExtentY        =   979
      _StockProps     =   0
   End
   Begin VB.Label Label1 
      Caption         =   "用语音天使控件,编程特别简单。注意:必须用有来电显示的语音猫"
      Height          =   195
      Left            =   0
      TabIndex        =   5
      Top             =   60
      Width           =   5415
   End
   Begin VB.Label Label2 
      Caption         =   "来电号码"
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   540
      Width           =   795
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private CallID As String, H As Integer
Private Sub Command1_Click()
  DataGrid1.AllowDelete = True
  If Ado.Recordset.RecordCount > 1 Then
  
   Ado.Recordset.Delete
  ' Ado.Recordset.MoveNext
   End If
End Sub

Private Sub Form_Load()
   VoiceAngel.Init
   VoiceAngel.SetCurLine 0
End Sub

Private Sub VoiceAngel_CallerID(ByVal LineIndex As Integer, ByVal CallerID As String)
 
 With Ado.Recordset
       Text1.Text = CallerID
       CallID = CallerID
       .AddNew
       .Fields("号码") = CallID
       .Fields("来电日期时间") = CStr(Date) + " " + CStr(Time)
       .Update
        VoiceAngel.Answer
    End With
End Sub

Private Sub VoiceAngel_Connected(ByVal LineIndex As Integer, ByVal fInComing As Boolean)
PlayF CallID
End Sub
Sub PlayF(wenjian As String)
   Dim file As String
   Dim files As String
    VoiceAngel.NewWaveFile "temp", 0, 0, 0
    file = Trim(wenjian)
    For i = 1 To Len(file)
    files = Left(file, i)
    files = Right(files, 1)
    VoiceAngel.AppendWaveFile files & ".wav"
    
    Next i
    VoiceAngel.SeekWaveFile 0
    VoiceAngel.StartPlaying False, False
End Sub

Private Sub VoiceAngel_PlayDone(ByVal LineIndex As Long)
  VoiceAngel.CloseWaveFile
     H = H + 1
    If H = 1 Then
       VoiceAngel.Drop
       VoiceAngel.OpenWaveFile "ring.wav"
       VoiceAngel.StartPlaying True, False
       
    End If
End Sub

Private Sub VoiceAngel_Ringing(ByVal LineIndex As Integer, ByVal numRing As Integer)
     H = 0
End Sub

⌨️ 快捷键说明

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