Example #1
0
 public void SetTextBoxText(TextBox tbPassTextBox, string sPassText)
 {
     if (tbPassTextBox.InvokeRequired)
     {
         SetTextBoxTextCallback d = new SetTextBoxTextCallback(SetTextBoxText);
         this.Invoke(d, new object[] { tbPassTextBox, sPassText });
     }
     else
     {
         tbPassTextBox.Text = sPassText;
     }
 }
Example #2
0
 private void SetTextBoxText(TextBox textbox, string text)
 {
     if (textbox.InvokeRequired)
     {
         SetTextBoxTextCallback de = new SetTextBoxTextCallback(SetTextBoxText);
         this.Invoke(de, new object[] { textbox, text });
     }
     else
     {
         textbox.Text = text;
     }
 }