Hello experts, I'm working on a threaded application and would like to know how to display a status window when a call for WaitForStatus is invoked. I happen to have code that looks like this:
StatusForm sf = new StatusForm(); .. service.Stop(); service.WaitForStatus(ServiceControllerStatus.Running, timeout); sf.ShowDialog(); // the message "please wait..." is shown ... I can't seem to time it right when the WaitForStatus is called. The status window either shows up right away and disappears even if the WaitforStatus is not yet complete *or* the status window gets displayed for too long, that unbeknowst to me, the WaitforStatus call could have been completed by then. I experimented with the use of a Timer component for the statusForm, but the problem is still there: the correct timing of when to start and end the status window which synchronizes with the starting and stopping of threads. I'm aware there's a way to do it but I couldn't express it in code. Would there be someone here that could point me to the right direction? Thanks for your help in advance! Benj
