Herfried K. Wagner said:
I expected this question
Well, i have a form (my main form) with some
buttons on it (that's a very simplified description). When the user clicks
on one of the buttons, i'm calling a web service method and that can take
some time. So while the call is being made, i'm displaying a "Please wait"
form with a progress bar on it. I want the user to be unable to use the main
form while the web service call is being made.
To display this waiting form, i've first tried to create a new thread, make
my web service call in this new thread and display the waiting form in the
main UI thread. This didn't work well because for some reason my waiting
form was almost frozen although the web service call was being made in a
separate thread.
So i've took another approach: i am creating a new thread and displaying the
waiting form in this new thread (with the ShowDialog method) then i'm
calling my web service method from the main UI thread. This works grand.
However, i would like to set the Parent property of my waiting form to be my
main form so that the user can not click on the main form while the web
service call is being made.
Have i been clear enough?
Thanks.