G
Guest
Hi there,
I have a multithreaded UI (windows forms) and I have been very carefull that
all my forms and controls are created on the UI thread. However, I have
noticed the in some situations my overridden OnLoad method on one form is
being called on a ono UI thread.
My question is: Is it possible for the OnLoad method to be called on a
different thread other than the one that called .Show()? I'm trying to
establish whether my OnLoad method should be checking the InvokeRequired
event.
I suspect I have some kind of race condition as if I have break points in
the code before the .Show() then it seems fine!!
Thanks for your help
I have a multithreaded UI (windows forms) and I have been very carefull that
all my forms and controls are created on the UI thread. However, I have
noticed the in some situations my overridden OnLoad method on one form is
being called on a ono UI thread.
My question is: Is it possible for the OnLoad method to be called on a
different thread other than the one that called .Show()? I'm trying to
establish whether my OnLoad method should be checking the InvokeRequired
event.
I suspect I have some kind of race condition as if I have break points in
the code before the .Show() then it seems fine!!
Thanks for your help