Form.Invoke

  • Thread starter Thread starter Randolph Neall
  • Start date Start date
R

Randolph Neall

What happens when Form.Invoke is run against a thread that is already
executing other code? Does the Invoke wait its turn or does something go
wrong?

Randy Neall
 
Hi Randolph,
If the thread owning the form's handle is busy. Form.Invoke (Control.Invoke)
is going to wait its turn. Internally Control.Invoke uses SendMessage, which
in the case when the sender is executed in different thread goes through the
message queue.

HTH
b\rgds
100
 
Thanks!

Randy



100 said:
Hi Randolph,
If the thread owning the form's handle is busy. Form.Invoke (Control.Invoke)
is going to wait its turn. Internally Control.Invoke uses SendMessage, which
in the case when the sender is executed in different thread goes through the
message queue.

HTH
b\rgds
100
 
Back
Top