Waiting Form

  • Thread starter Thread starter John
  • Start date Start date
J

John

Try to implement an waiting form, which has a label and a
textbox, as below:

FormWait fm = new FormWait();
fm.Show();
for (long i = 0; i < 20000000; i++)
{
// some lengthy operations
}
fm.Close();

The texts of the label and the textbox won't display until
the for loop ends. How can I make them display from the
begining?

Thanks

John
 
put a doevents in the loop. This will keep it from appearing to lock up as
well.
 

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