What's the difference between check InvokeRequired
and call Invoke
method for a control
and for the parent form if I want to deal with the control from another thread?
if (theForm.InvokeRequired)
Invoke(...)
Or
if (myControl.InvokeRequired)
myControl.Invoke(...)
From MSDN:
The Invoke method searches up the control's parent chain until it finds a control or form that has a window handle if the current control's underlying window handle does not exist yet.