Hi all
I have a serious bug in my design. The error shows that the caption of my main window changes after exporting the registry data; which i do not want to happen. Is there any way not to change the main window caption while exporting?
Code:
private void menuItemExport_Click(object sender, System.EventArgs e)
{
string fullPath = "";
fullPath = this.tvFolders.SelectedNode.FullPath.ToString();
//for opening the savefile option dialog box
SaveFileDialog iniFile = new SaveFileDialog();
iniFile.Title = "Export the registry file";
iniFile.InitialDirectory = @"c:\";
iniFile.Filter = "sbreg files (*.sbreg)|*.sbreg|All files (*.*)|*.*";
iniFile.FilterIndex = 4;
iniFile.RestoreDirectory = false;
string fileName = "";
//the file has to be saved after clicking the OK button
if (iniFile.ShowDialog() == DialogResult.OK)
{
this.Text = iniFile.FileName;
//fileName = iniFile.FileName.ToString();
if (System.IO.File.Exists(iniFile.FileName))
{
System.IO.File.Delete(iniFile.FileName);
}
Pls help me anyone.
Thanks