disabling

  • Thread starter Thread starter Xarky
  • Start date Start date
X

Xarky

Hi,
I have a program, that connects to a webservice to retrieve data.
While it is connected and retrieving data, and I click on some
component like a text box or button, the window freezes till the
connection to the webservice terminates.

Upon connection, I was to disable every component and then enable
them again after succesfull retrieval. Is there a way how to disable
all the components together instead of having to disable one by one.


Thanks for your help.
 
Yeah, it is very easy, just call Form.SuspendLayout(); then when you are done
call Form.ResumeLayout();

This way you can enable or disable all the controls you need to, and then
perform the action all at once.

Thanks,
Justin Etheredge
 
Back
Top