Ejemplo n.º 1
0
 private void SetControlText(Control control, string text)
 {
     if (this.InvokeRequired)
     {
         ControlTextMethod ctm = new ControlTextMethod(SetControlText);
         this.Invoke(ctm, new object[] { control, text });
     }
     else
     {
         control.Text = text;
     }
 }
 private void SetControlText(Control control, string text)
 {
     if (control.InvokeRequired)
     {
         ControlTextMethod controlTextMethod = new ControlTextMethod(SetControlText);
         control.Invoke(controlTextMethod, new object[] { control, text });
     }
     else
     {
         control.Text = text;
     }
     Application.DoEvents();
 }
Ejemplo n.º 3
0
 private void SetControlText(Control control, string text)
 {
     if (control.InvokeRequired)
     {
         ControlTextMethod controlTextMethod = new ControlTextMethod(SetControlText);
         control.Invoke(controlTextMethod, new object[] { control, text });
     }
     else
     {
         control.Text = text;
     }
     Application.DoEvents();
 }