Quote:
Originally posted by eran114
Private Declare Function mciSendString Lib "winmm.dll" Alias _
"mciSendStringA" (ByVal lpstrCommand As String, ByVal _
lpstrReturnString As Any, ByVal uReturnLength As Long, ByVal _
hwndCallback As Long) As Long
Private Sub cmdRecord_Click()
Dim i As Long
i = mciSendString("open new Type waveaudio Alias capture", 0&, 0, 0)
i = mciSendString("set capture bitspersample 8", 0&, 0, 0)
i = mciSendString("set capture samplespersec 11025", 0&, 0, 0)
i = mciSendString("set capture channels 1", 0&, 0, 0)
i = mciSendString("record capture", 0&, 0, 0)
End Sub
Private Sub cmdStopRecord_Click()
Dim i As Long
i = mciSendString("stop capture", 0&, 0, 0)
i = mciSendString("save capture c:\NewWave.wav", 0&, 0, 0)
i = mciSendString("close capture", 0&, 0, 0)
End Sub
Do this: