Ensuring a control is visible before processing commences

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What is the best way to ensure a control is visible to a user before processing commences? I want to make a label visible using "label.visible = True" but the processing that immediately follows this statement is CPU intensive and the label does not actually get displayed until the processing completes in about 10 seconds
 
Right after the Visible = True put an Application.DoEvents statement

PJ said:
What is the best way to ensure a control is visible to a user before
processing commences? I want to make a label visible using "label.visible =
True" but the processing that immediately follows this statement is CPU
intensive and the label does not actually get displayed until the processing
completes in about 10 seconds.
 
What is the best way to ensure a control is visible to a user before processing commences? I want to make a label visible using "label.visible = True" but the processing that immediately follows this statement is CPU intensive and the label does not actually get displayed until the processing completes in about 10 seconds.

Try:

label.refresh();
Application.DoEvents();

To give it a chance to re-paint itself?
 

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