G
Guest
I have a windows form that contains a few windows controls such as buttons, labels and textboxes. In the Load event of the Form, I'm calling a HelloWorld webmethod asynchronously. The webmethod is a simple function that counts upto 5000, then returns a string. In the callback, I'm invoking a delegate that displays the string returned by the webmethod via MessageBox.Show
When I run the windows application, immediately switch to another application before the form to becomes visible, and switch back to the winsows form after the webmethod has finished running, the messagebox appears modally as it should. When I run the windows application, and wait for the webmthod to finish running, the messagebox appears modally as it should.
When I run the windows application and wait for the form to become visible, immediately switch to another application, and switch back to the winsows form after the webmethod has finished running, the messagebox appears modeless, which allows me to focus on controls and type/click in/on the controls. Any idea why this happens or how to avoid it
Thanks.
When I run the windows application, immediately switch to another application before the form to becomes visible, and switch back to the winsows form after the webmethod has finished running, the messagebox appears modally as it should. When I run the windows application, and wait for the webmthod to finish running, the messagebox appears modally as it should.
When I run the windows application and wait for the form to become visible, immediately switch to another application, and switch back to the winsows form after the webmethod has finished running, the messagebox appears modeless, which allows me to focus on controls and type/click in/on the controls. Any idea why this happens or how to avoid it
Thanks.