private void SelLabel(string text) { if (this.lblStatus.InvokeRequired) { SetLabelDelegate d = new SetLabelDelegate(SelLabel); this.Invoke(d, new object[] { text }); } else { this.lblStatus.Text = text; } }
private void SetText(string value) { if (this.InvokeRequired) { SetLabelDelegate d = new SetLabelDelegate(SetText); this.Invoke(d, new object[] { value }); } else { textBox1.AppendText(value); } }
void SetLabel(Label lab, string t) { if (lab.InvokeRequired) { SetLabelDelegate setLabel = new SetLabelDelegate(SetLabel); this.BeginInvoke(setLabel, lab, t); } else { lab.Text = t; } }