In my application I am using a SaveFileDialog to prompt the user to save a generated file to a specific location - however I need to ensure that the file name itself cannot be changed...
For example, I have the following code:
Now, this works perfectly fine, the default under file name is "A.ZIP" but the user can change that and save it as anything they want, I need to ensure they cannot change the file name (A.ZIP) and only define where the file should be saved ...
Is there a way to set that field as read-only (for example?)
Any help, hints, or ideas would be much appreciated.
Thanks,
For example, I have the following code:
Code:
saveFileDialog.Title = "Save File";
saveFileDialog.InitialDirectory = "C:\\";
saveFileDialog.Filter = "Zip File (*.zip)|*.zip";
saveFileDialog.FileName = "A.ZIP";
if (saveFileDialog.ShowDialog() != DialogResult.Cancel)
File.Copy(sFile, saveFileDialog.FileName, true);
Now, this works perfectly fine, the default under file name is "A.ZIP" but the user can change that and save it as anything they want, I need to ensure they cannot change the file name (A.ZIP) and only define where the file should be saved ...
Is there a way to set that field as read-only (for example?)
Any help, hints, or ideas would be much appreciated.
Thanks,