W
Wayne
Running V1.1 with latest SP (1 right?), on Windows XP. I have the following
in a web service:
[WebMethod()]
public Double Factorial(int n )
{
double n1 = 1;
double result = 1;
while (n1 <= n)
{
result = result * n1;
n1 = n1 + 1;
}
System.Threading.Thread.Sleep(10000);
return result;
}
In my client Code I have under a button click:
MessageBox.Show(CSService.Factorial(20).ToString());
When the messageBox displays the main form is still selectable, I can click
items on the form, close the form etc...
If I put the sleep down to 100 the messagebox is displayed modally. I know
the example is unlikely that you would do something like this, but what if
the web service really takes this long? Also if I call the web service as
Async I see the same issue when the messagebox gets displayed.
--
Thanks
Wayne Sepega
Jacksonville, Fl
"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein
in a web service:
[WebMethod()]
public Double Factorial(int n )
{
double n1 = 1;
double result = 1;
while (n1 <= n)
{
result = result * n1;
n1 = n1 + 1;
}
System.Threading.Thread.Sleep(10000);
return result;
}
In my client Code I have under a button click:
MessageBox.Show(CSService.Factorial(20).ToString());
When the messageBox displays the main form is still selectable, I can click
items on the form, close the form etc...
If I put the sleep down to 100 the messagebox is displayed modally. I know
the example is unlikely that you would do something like this, but what if
the web service really takes this long? Also if I call the web service as
Async I see the same issue when the messagebox gets displayed.
--
Thanks
Wayne Sepega
Jacksonville, Fl
"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein