How do I get the SaveFileDialog
to pop up and redirect to a selected folder? I have tried what I can but I've only established to get the program to open the File Explorer and redirect to the folder without the SaveFileDialog
working.
This is my code:
private void button9_Click(object sender, EventArgs e)
{
Stream myStream;
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
saveFileDialog1.FilterIndex = 2;
saveFileDialog1.RestoreDirectory = true;
if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{
if ((myStream = saveFileDialog1.OpenFile()) != null)
{
myStream.Close();
}
}
}