Highlights
All Snippets
Top 100 Snippets
Librarians
gbCodeLib

By Language
VB6
JavaScript
Perl
HTML
SQL
Java
DOS

GBIC >> Source Code >> Visual Basic >> Snippet

Record sound (MM control)


'multimedia control supports AVI, MPG video files - .WAV, MID audio files - music CD in CD-ROM drive
'does not support .MP3 files
'multimedia control can be visible, or not.
'if visible, user can press buttons to control actions
'if not visible, control of files to be played is handled via code only

'Audio
'in form_load
MMControl1.Notify = False
MMControl1.Wait = True
MMControl1.Shareable = False

'then to record .wav file
MMControl1.DeviceType = "WaveAudio"
MMControl1.FileName = "d:\test.wav"
MMControl1.Command = "Open"


'reference
'events
.xxxClick
.xxxGotFocus
.xxxCompleted
.StatusUpdate
.Done

'properties/methods
.DeviceType ( Optional - automatically detected using filename extension)
.FileName
.Command    Open , Close , Play, Stop , Pause, Step , Back, Prev, Next, Record, Save, Eject, Sound

.Visible
.AutoEnable
.xxxEnabled  Play, Stop , Pause, Step , Back, Prev, Next, Record, Eject,
.CanEject, CanPlay, CanRecord, CanStop
.Orientation

.Shareable
.RecordMode

.TimeFormat
.Length / .Position
.From / . To
.Tracks / .TrackLength / .TrackPosition
.Frame

.UpdateInterval
.Wait
.Notify / .NotifyMessage / .NotifyValue
. Error / .ErrorMessage