Text property of System.Windows.Forms.Label hangs application

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

Guest

I have a form with label in it:

public class EnrollScanForm : System.Windows.Forms.Form
{
private System.Windows.Forms.Label infoLabel;
.....
}

I show form and at some moment change label's text:

infoLabel.Text = "Some info";

and form is hangs and not responding from that moment.
If i make some delay before text update:

Thread.Sleep( 1 );
infoLabel.Text = "Some info";

all is ok.
What i am making wrong?
 

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