F
Fabien Bezagu
Hi,
Here is what the documentation of InvokeRequired says :
"In addition to the InvokeRequired property, there are four methods on a
control that are safe to call from any thread: Invoke, BeginInvoke,
EndInvoke and CreateGraphics. For all other method calls, you should use one
of these invoke methods when calling from a different thread. "
Could someone explain me why a call to CreateGraphics is "safe" ? One of my
backgroud threads calls CreateGraphics on a control but when this control is
destroyed (ie the application is closed), this thread is blocked on the call
to CreateGraphics and isn't aborted. I don't understand why a call to Invoke
isn't required in this case.
Thanks
Fabien
Here is what the documentation of InvokeRequired says :
"In addition to the InvokeRequired property, there are four methods on a
control that are safe to call from any thread: Invoke, BeginInvoke,
EndInvoke and CreateGraphics. For all other method calls, you should use one
of these invoke methods when calling from a different thread. "
Could someone explain me why a call to CreateGraphics is "safe" ? One of my
backgroud threads calls CreateGraphics on a control but when this control is
destroyed (ie the application is closed), this thread is blocked on the call
to CreateGraphics and isn't aborted. I don't understand why a call to Invoke
isn't required in this case.
Thanks
Fabien