public void UpdateStatusStrip(String Text) { // InvokeRequired required compares the thread ID of the // calling thread to the thread ID of the creating thread. // If these threads are different, it returns true. if (this.statusStrip1.InvokeRequired) { UpdateStatusStripCallback d = new UpdateStatusStripCallback(UpdateStatusStrip); this.Invoke(d, new object[] { Text }); } else { // enable or disable the login button toolStripStatusLabel1.Text = Text; } }