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