Click here to Skip to main content
15,900,510 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i have done sound recording in C# it also save the recorded sound but at fixed location..
i want to provide save dialog box to save that file..how to do..please help me..thanks..i am posting my code here..
private void savestopbutton_Click(object sender, RoutedEventArgs e)
        {
            textBox1.Text = "";
            DispatcherTimer dispatcherTimer = new DispatcherTimer();
            dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
            dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);

            interval = new TimeSpan(0, 0, 0);
            dispatcherTimer.Interval = interval;
            dispatcherTimer.Stop();
            mciSendString("save recsound d:\\WPF\\record.wma", "", 0, 0);
            mciSendString("close recsound ", "", 0, 0);
            Computer c = new Computer();
            c.Audio.Stop();

         
        }
Posted

1 solution

Show a save dialog form and allow the user to choose the path.
Capture the string of the path selected by him and place it in the mciSendString("save recsound d:\\WPF\\record.wma" line (instead of the hardcoded path and file name).
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 18-May-11 15:18pm    
Aha, a 5.
--SA
Abhinav S 19-May-11 0:01am    
Thank you SA.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900