When does the value of the InvokeRequired property change?

When I want to use the delegate class to call while working with windows, I always need to use InvokeRequired. All is well. But who changed the InvokeReuqired property at runtime. Please check this image: alt text

+3
source share
3 answers

You call Delegate.BeginInvokein button1_Click, which means it SayListeyeEklewill be called in the thread pool thread, which means true for InvokeRequiredis true. This would not be true if you would call ListeyeEkledirectly from button1_Clickwithin the user interface thread.

+4
source

InvokeRequired - true, , , , false .

  , , InvokeRequired "" ; , , .

+6

" InvokeRequired"? , true/false ? true, BeginInvoke, . , "" , . InvokeRequired , , , InvokeRequired true. , , false. NotOnThreadIWasCreatedIn, , . InvokeRequired , ...

+1
source

Source: https://habr.com/ru/post/1720288/


All Articles