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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top