Hello guys!
even though i haven't got a reply for my first thread today, yet , i have another question... About vb.net sound recorders.. I have this code but it isn't working probably because i defined the location that's different from the current pc i'm using... my question is Is there's a way to let the user specify where to save and from where to open a saved sound using a OpenFileDialog and SaveFileDialog? and how to do it?
thank you in advance
even though i haven't got a reply for my first thread today, yet , i have another question... About vb.net sound recorders.. I have this code but it isn't working probably because i defined the location that's different from the current pc i'm using... my question is Is there's a way to let the user specify where to save and from where to open a saved sound using a OpenFileDialog and SaveFileDialog? and how to do it?
thank you in advance
Code:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Button1.Enabled = False
Button2.Enabled = True
mciSendString("open new Type waveaudio Alias sound", "", 0, 0)
mciSendString("record sound", "", 0, 0)
Label1.Text = "Recording..."
Label1.Visible = True
End Sub
Private Sub Button2_Click(sender As System.Object, e As System.EventArgs) Handles Button2.Click
Button1.Enabled = True
Button2.Enabled = False
Button3.Enabled = True
mciSendString("save sound c:\Users\xyz\SOUND.wav", "", 0, 0)
mciSendString("close sound", "", 0, 0)
MsgBox("File Created: C:\sound.wav")
Label1.Text = "Stopped..."
Label1.Visible = False
My.Computer.Audio.Stop()
End Sub
Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
My.Computer.Audio.Play("c:\Users\xyz\SOUND.wav", AudioPlayMode.Background)
Label1.Text = "Playing..."
Label1.Visible = True
End Sub