M
mary jones
Hi:
When I try to refresh Windows forms which contains a menu
doesn't refresh the menu.
this is what my code looks like:
if( DialogResult.OK == MessageBox.Show( "Please UnZip the
file: " + fileName + " , and then press ok", "Some Text
Advisor", MessageBoxButtons.OKCancel ))
{
this.Parent.Parent.Refresh();
this.Parent.Parent.Hide();
if ( fileName.IndexOf ( ".esd" ) > 0 )
{
Cursor.Current = Cursors.WaitCursor;
//importing of files processing
}
else if ( fileName.IndexOf ( ".ra3" ) > 0 )
{
Cursor.Current = Cursors.WaitCursor;
//importing of files processing
}
string temp = fileName.Substring(
System.Math.Max( fileName.LastIndexOf( '\\' ),
0 ) );
string fileToBeMoved =
processedDirectory.FullName + "\\" + temp;
if ( File.Exists ( fileToBeMoved ))
File.Delete ( fileToBeMoved );
File.Move ( fileName, fileToBeMoved );
Cursor.Current = Cursors.Default;
}
When this loop is doing importing of files, and click on
any where on menu or any control on windows form, my menu
just whites out and the forms title says (not
responding ), though it is still doing import work.
How can I resolve this, please help, anybody faced same
problem?
When I try to refresh Windows forms which contains a menu
doesn't refresh the menu.
this is what my code looks like:
if( DialogResult.OK == MessageBox.Show( "Please UnZip the
file: " + fileName + " , and then press ok", "Some Text
Advisor", MessageBoxButtons.OKCancel ))
{
this.Parent.Parent.Refresh();
this.Parent.Parent.Hide();
if ( fileName.IndexOf ( ".esd" ) > 0 )
{
Cursor.Current = Cursors.WaitCursor;
//importing of files processing
}
else if ( fileName.IndexOf ( ".ra3" ) > 0 )
{
Cursor.Current = Cursors.WaitCursor;
//importing of files processing
}
string temp = fileName.Substring(
System.Math.Max( fileName.LastIndexOf( '\\' ),
0 ) );
string fileToBeMoved =
processedDirectory.FullName + "\\" + temp;
if ( File.Exists ( fileToBeMoved ))
File.Delete ( fileToBeMoved );
File.Move ( fileName, fileToBeMoved );
Cursor.Current = Cursors.Default;
}
When this loop is doing importing of files, and click on
any where on menu or any control on windows form, my menu
just whites out and the forms title says (not
responding ), though it is still doing import work.
How can I resolve this, please help, anybody faced same
problem?