G
Guest
Hi,
From MSDN documentation, it implies that any cross ui thread calls will
result in InvalidOperationException when one tries to access a UI object from
a non-creation thread.
I have a situation where someone is executing some code in a thread pool
(Threading.IsThreadPoolThread is true and so if Form.InvokeRequired is true)
and yet when it calls
// this.mainTabControl.InvokeRequired is true
TabControl tc = this.mainTabControl.TabPages;
it does not throw the InvalidOperationException, why? Is this because it is
not actually accessing the UI part of the control? If is like going through
its internal list?
Thanks.
Leon
From MSDN documentation, it implies that any cross ui thread calls will
result in InvalidOperationException when one tries to access a UI object from
a non-creation thread.
I have a situation where someone is executing some code in a thread pool
(Threading.IsThreadPoolThread is true and so if Form.InvokeRequired is true)
and yet when it calls
// this.mainTabControl.InvokeRequired is true
TabControl tc = this.mainTabControl.TabPages;
it does not throw the InvalidOperationException, why? Is this because it is
not actually accessing the UI part of the control? If is like going through
its internal list?
Thanks.
Leon