private void SetControlValue(Control control, object value) { try { control.FindForm().Invoke((Action)(() => { if (control is TextBox) { ((TextBox)control).Text = value.ToString(); } })); } catch { } }