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

📄 voicerec.ebf

📁 适用于Wince的EVB3.0写的录音实例
💻 EBF
字号:
VERSION 5.00
Begin VB.Form frmVoiceRec 
   Appearance      =   0  'Flat
   BackColor       =   &H80000005&
   Caption         =   "VoiceRecorder Sample"
   ClientHeight    =   3765
   ClientLeft      =   60
   ClientTop       =   840
   ClientWidth     =   3675
   ForeColor       =   &H80000008&
   ScaleHeight     =   3765
   ScaleWidth      =   3675
   ShowOK          =   -1  'True
   Begin VB.Line linHeading 
      X1              =   0
      X2              =   3600
      Y1              =   345
      Y2              =   345
   End
   Begin VBCE.Label lblHeading 
      Height          =   255
      Left            =   120
      TabIndex        =   3
      Top             =   75
      Width           =   3375
      _cx             =   5953
      _cy             =   450
      AutoSize        =   0   'False
      BackColor       =   -2147483643
      BackStyle       =   1
      BorderStyle     =   0
      Caption         =   "Recording and Playing"
      Enabled         =   -1  'True
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Tahoma"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   -2147483635
      Alignment       =   0
      UseMnemonic     =   -1  'True
      WordWrap        =   0   'False
   End
   Begin VBCE.CheckBox chkMoveable 
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   1080
      Width           =   3375
      _cx             =   5953
      _cy             =   450
      BackColor       =   -2147483643
      Caption         =   "VoiceRecorder control moveable"
      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
      Alignment       =   0
      Value           =   0
   End
   Begin VBCE.CommandButton cmdPlay 
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   1920
      Width           =   2175
      _cx             =   3836
      _cy             =   661
      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.CommandButton cmdRecord 
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   1440
      Width           =   2175
      _cx             =   3836
      _cy             =   661
      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
End
Attribute VB_Name = "frmVoiceRec"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'******************************************************************************
' Implements Voice Recorder Sample Form
'******************************************************************************
' FileName:  VoiceRec.ebf
' Creator:   Christian Forsberg
' Created:   2001-07-15
'******************************************************************************
' Version   Date   Who Comment
' 00.00.000 010715 CFO Created
'******************************************************************************
Option Explicit
Private hVoiceRecorder As Long
Private Sub cmdRecord_Click()

' Show Voice Recorder control to record new file.
' Known bugs:
' Version   Date   Who Comment
' 00.00.000 010715 CFO Created
'******************************************************************************
  
  hVoiceRecorder = ShowVoiceRecorder(hwnd, 8, 32, "\My Documents\sound.wav", True, (chkMoveable.Value = 1), True, False)
  
  'hVoiceRecorder = ShowVoiceRecorder(hwnd, 8, 32, "\My Documents\sound.wav", False, (chkMoveable.Value = 1), True, False)
  'Call SendMessageString(hVoiceRecorder, VRM_RECORD, 0, 0)
 
End Sub
Private Sub cmdPlay_Click()

' Play sound file.
' Known bugs:
' Version   Date   Who Comment
' 00.00.000 010715 CFO Created
'******************************************************************************
  
  PlaySoundFile "\My Documents\sound.wav"
  
  ' To play with Voice Recorder control, do this:
  'hVoiceRecorder = ShowVoiceRecorder(hWnd, 8, 32, "\My Documents\sound.wav", True, (chkMoveable.Value = 1), False, True)
  
End Sub
Private Sub Form_OKClick()
  
' End Application.
' Known bugs:
' Version   Date   Who Comment
' 00.00.000 010715 CFO Created
'******************************************************************************
  
  App.End

End Sub

⌨️ 快捷键说明

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