how to make a sound recorder
add 3 buttons
button1 text "record"
button2 text "save"
button3 text "play"
delete all code and add this 1:
Code:
Public Class Form1
Private Declare Function record Lib "winmm.dll" Alias "mciSendStringA" (ByVal lpstrCommand As String, ByVal lpstrReturnString As String, ByVal uReturnLength As Integer, ByVal hwndCallback As Integer) As Integer
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
Me.Hide()
Form1.Show()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
record("open new Type waveaudio Alias recsound", "", 0, 0)
record("record recsound", "", 0, 0)
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
record("save recsound c:\mic.wav", "", 0, 0)
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
My.Computer.Audio.Play("c:\mic.wav", AudioPlayMode.Background)
End Sub
End Class
THX me no ZP needed :P
