problems with saveFileDialog
Hi all,
Have a bit of a strange one here.
On my form, I'm using a SaveFileDialog box
private: System::Windows::Forms::SaveFileDialog^ saveFileDialog1;
on initiate
this.saveFileDialog1.DefaultExt = "xml";
this.saveFileDialog1.Filter = "SCM files|*.xml";
this.saveFileDialog1.InitialDirectory = "c:\";
when my user calls a save menu option, I initiate the dialog as follows:
saveFileDialog1.ShowDialog();
String temp = saveFileDialog1.FileName;
....
When I test the code, I get the following result:
1. save file dialogue pops up perfectly
2. if saving a new file name, all is well
3. if REPLACING an existing file, all appears to hang.If the overwrite prompt
is set to false then it will work.but it wont check wether the file exists or not
Anyone have any ideas?
Re: problems with saveFileDialog
Hmmm...
I don't seem to be having any issues with my saving here... And i'm using (pretty much) the same code.
Could it maybe have something to do with the file size???
I'll take a look at my code, and I'll post the saving part here.
Re: problems with saveFileDialog
Quote:
Originally Posted by binilprasad
Hi all,
Have a bit of a strange one here.
.........
this.saveFileDialog1.DefaultExt = "xml";
this.saveFileDialog1.Filter = "SCM files|*.xml";
this.saveFileDialog1.InitialDirectory = "c:\";
when my user calls a save menu option, I initiate the dialog as follows:
saveFileDialog1.ShowDialog();
String temp = saveFileDialog1.FileName;
....
Anyone have any ideas?
I'll bet that the problem is probably not with the saveFileDialog but with how you are saving the file. Please show us your "save file" code here, not just the dialog code. What are you using to save the file, a stream? Also, check your path statements that you have double "\\" backslashes instead of the single backslash that is shown here.
Good luck!
/Pete