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

📄 main.ebf

📁 eVB 呼叫由eVC 所撰寫的DLL檔案達到使用程式來控制錄放音的要求
💻 EBF
字号:
VERSION 5.00
Begin VB.Form frmMain 
   Appearance      =   0  'Flat
   BackColor       =   &H80000005&
   Caption         =   "Test VBVoice"
   ClientHeight    =   3600
   ClientLeft      =   60
   ClientTop       =   840
   ClientWidth     =   3585
   ForeColor       =   &H80000008&
   ScaleHeight     =   3600
   ScaleWidth      =   3585
   ShowOK          =   -1  'True
   Begin VBCE.CommandButton cmdRec 
      Height          =   255
      Left            =   120
      TabIndex        =   4
      Top             =   720
      Width           =   975
      _cx             =   1720
      _cy             =   450
      BackColor       =   12632256
      Caption         =   "Record"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Style           =   0
   End
   Begin VBCE.CommandButton cmdSetNewFile 
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   1080
      Width           =   1455
      _cx             =   2566
      _cy             =   450
      BackColor       =   12632256
      Caption         =   "Set New File"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Style           =   0
   End
   Begin VBCE.CommandButton cmdStop 
      Height          =   255
      Left            =   2160
      TabIndex        =   2
      Top             =   720
      Width           =   855
      _cx             =   1508
      _cy             =   450
      BackColor       =   12632256
      Caption         =   "Stop"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Style           =   0
   End
   Begin VBCE.CommandButton cmdPlay 
      Height          =   255
      Left            =   1200
      TabIndex        =   1
      Top             =   720
      Width           =   855
      _cx             =   1508
      _cy             =   450
      BackColor       =   12632256
      Caption         =   "Play"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Style           =   0
   End
   Begin VBCE.TextBox txtFileName 
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   1575
      _cx             =   2778
      _cy             =   661
      BackColor       =   -2147483643
      BorderStyle     =   1
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483640
      Text            =   "\test.wav"
      Alignment       =   0
      HideSelection   =   -1  'True
      Locked          =   0   'False
      MaxLength       =   0
      MultiLine       =   0   'False
      PasswordChar    =   ""
      ScrollBars      =   0
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim XPos As Integer
Dim YPos As Integer


Private Sub cmdPlay_Click()
Dim bRet As Boolean

bRet = vbVoicePlay()

End Sub

Private Sub cmdRec_Click()
Dim bRet As Boolean

bRet = vbVoiceRec()
End Sub

Private Sub cmdSetNewFile_Click()
' used after user typed in new file in the
' edit box
' in order for the  voice control to use
' a different file, you must close the control
' and create a new one

Dim bRet As Boolean

bRet = vbVoiceOk()
bRet = vbCreateVoiceControl(hWnd, VRS_NO_MOVE, XPos, YPos, txtFileName.Text)
If (Not bRet) Then
    MsgBox ("Failed to create voice control")
End If

End Sub

Private Sub cmdStop_Click()
Dim bRet As Boolean

bRet = vbVoiceStop()



End Sub

Private Sub Form_Load()
Dim bRet As Boolean

XPos = 10
YPos = 100

bRet = vbCreateVoiceControl(hWnd, VRS_NO_MOVE, XPos, YPos, txtFileName.Text)
If (Not bRet) Then
    MsgBox ("Failed to create voice control")
End If
    


End Sub

Private Sub Form_OKClick()
    App.End
End Sub

⌨️ 快捷键说明

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