Cross-thread operation not valid, even if using InvokeRequired [duplicate]
问题 This question already has answers here : Invoke or BeginInvoke cannot be called on a control until the window handle has been created (10 answers) Closed 12 months ago . I have a form with my custom controls on it. I have a method in my Form: private void SetEnabledOnControls(bool val) { if (InvokeRequired) { Invoke((Action<bool>)SetEnabledOnControls, val); } else { //do the work - iterate over child controls, //and they iterate over their children, etc... } } And inside the methods that are