I get the following exception when calling saveFileDialog.ShowDialog() in a background thread:
Current thread must be set to single thr
Add following code on FormLoad
private void Form1_Load(object sender, EventArgs e)
{
Thread myth;
myth = new Thread(new System.Threading.ThreadStart(CallSaveDialog));
myth.ApartmentState = ApartmentState.STA;
myth.Start();
}
Here CallSaveDialog is a thread and here you can call ShowDialog like this
void CallSaveDialog(){saveFileDialog.ShowDialog();}