Hello Everybody,
I'm having a difficulty building a Sound Recorder...
I have the following code so fa, i want the code to prompt the user where to save and what to open instead of defining them in the user, a.s.a.p help please:
I'm having a difficulty building a Sound Recorder...
I have the following code so fa, i want the code to prompt the user where to save and what to open instead of defining them in the user, a.s.a.p help please:
VB.NET:
Private Declare Function mciSendString 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 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 recsound", "", 0, 0)
mciSendString("record recsound", "", 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 recsound c:\Users\EmoOoy\RECSOUND1.wav", "", 0, 0)
mciSendString("close recsound", "", 0, 0)
MsgBox("File Created: C:\recsound.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\EmoOoy\RE*CSOUND1.wav", AudioPlayMode.Background)
Label1.Text = "Playing..."
Label1.Visible = True
End Sub