コード例 #1
0
ファイル: Form1.cs プロジェクト: changweihua/FormSolution
 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;
     }
 }
コード例 #2
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();
 }
コード例 #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();
 }