I want to get the file name and path from a SaveFileDialog (for a
'save as' operation) after the user has saved the information under a
new file name (and presumably under a new path) ?
I want to display the new file name and path in the Form.text Title.
So how do I go about getting the info ?
Heres my code:
private void menu_profile_saveas_Click(object sender,
System.EventArgs e)
{
//Open file for reading
SaveFileDialog saveFileDialog1 = new SaveFileDialog();
saveFileDialog1.InitialDirectory = geoData.GetFilePath();
saveFileDialog1.Filter = "DAT31-8 Files
(*.N31)|*.n31|All Files (*.*)|*.*" ;
saveFileDialog1.FilterIndex = 1;
saveFileDialog1.RestoreDirectory = true ;
//read and filter the raw data
if(saveFileDialog1.ShowDialog() ==
DialogResult.OK)
{
geoData.SaveToN31File(saveFileDialog1.FileName);
}
}
Could someone please help ?
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com