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.
 
Hi,

You can create a new thread and the window fill not freeze :) ..
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top