public static void SetCtrlVisible(Form parentForm, Control ctrl, bool value) { if (parentForm.InvokeRequired) { SetCtrlVisibleHandler method = new SetCtrlVisibleHandler(SetCtrlVisibleMethod); parentForm.BeginInvoke(method, new object[] { ctrl, value }); } else { SetCtrlVisibleMethod(ctrl, value); } }
public static void SetCtrlVisible(Form parentForm, Control ctrl, bool value) { if (parentForm.InvokeRequired) { SetCtrlVisibleHandler method = new SetCtrlVisibleHandler(SetCtrlVisibleMethod); parentForm.BeginInvoke(method, new object[] { ctrl, value }); } else { SetCtrlVisibleMethod(ctrl, value); } }