Is there a difference between using Invoke for the parent form or for the target control?

What is the difference between checking the InvokeRequired method and calling Invoke for the control and for the parent form if I want to deal with a control from another thread?

 if (theForm.InvokeRequired) Invoke(...) 

Or

 if (myControl.InvokeRequired) myControl.Invoke(...) 

From MSDN :

The Invoke method searches for a control parent chain until it finds a control or form that has a window handle, if the current control window handle does not exist.

+4
source share
1 answer

These two effects have the same effect. You can assume that the form and the control were created in the same thread.

+7
source

All Articles