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?
 
Back
Top