URGENTCusom dialog boxes

  • Thread starter Thread starter Mustafa Rabie
  • Start date Start date
M

Mustafa Rabie

Dear All,
I am writing an app that does some syncronization with a mobile device. I
use the
System.Threading.Thread.Sleep(15000);
to sleep the main app thread for 15 sec till the sync is finished.
I want to show a form "Please Wait... while syncronizing" and when it's done
i close that form.
how can this be done?
i tried the following:
private void Sync_Connection()
{
SyncWindow wSync = new SyncWindow("Please Wait...");
wSync.Show();
abc();
this.cmnuConnect.Enabled = false;
this.cmnuDisconnect.Enabled = true;
this.SyncFiles(); //i sleep here
wSync.Close();
}

but this doesn't always show on top of the main form and if the main form is
clicked it gets focus. I tired wSync.ShowDialog() but it carries the
control to the wSync form and waits till the wSync form is closed.

Thanks a lot for your help really appreciated

Mustafa Rabie
 
Mustafa,

In the properties of the form can you not just set the TopMost Property to
true?

Regards
Scott Blood
C# Developer
 
Back
Top