private void ClearTextbox() { if (this.textBox1.InvokeRequired) { ClearTextboxDelegate d = new ClearTextboxDelegate(ClearTextbox); this.Invoke(d); } else { this.textBox1.Clear(); } }