SaveFileDialog sfd = new SaveFileDialog();
sfd.ShowDialog();
sfd.Filter("Wave Files|*.wav");
ss.SetOutPutToWaveFile(sfd.FileName);
ss.Speak(richTextbox.Text);
ss.SetOutputToDefaultAudioDevice();
Asked
Active
Viewed 60 times
0
-
if not understand what I asking, please tell me. thanks – kch4416 Sep 04 '15 at 13:56
-
https://msdn.microsoft.com/en-us/library/e61ft40c%28v=vs.110%29.aspx – theB Sep 04 '15 at 13:57
2 Answers
3
if (sfd.ShowDialog() == DialogResult.OK){
//user saved it
}
else {
//write code to handle the case when an user does't save , and canceled it
}

Viva
- 1,983
- 5
- 26
- 38
-
do not use sfd.ShowDialog(); anymore. Erase this line . And use it like I have shown. – Viva Sep 04 '15 at 14:09
2
Use a return value from sfd.ShowDialog()
:
if (sfd.ShowDialog() == DialogResult.OK)
{
// File was selected
}
else
{
// Cancelled
}

Dmitry
- 13,797
- 6
- 32
- 48