G
Guest
Three quick (I hope) questions regarding async programming in a windows
form:
1) When I perform a BeginInvoke on a delegate in my own thread (actually the
main GUI thread) in the midst of a message event handler (say OnMouseUp),
does the implementation basically work the same as the BeginInvoke from
another thread, i.e., a message is posted, the event handler completes
execution, then when the message is dequeued, the target method is invoked?
2) Is there a complete list of how synchronous paint calls can be generated?
I know that doing an Invalidate() simply queues a paint message, but adding
an Update() causes a synchronous paint message. If my handler for the async
event absolutely needs to know that OnPaint(0 is not entered while it is
doing it's work, what else could it do incorrectly, (besides calling
Update()) that could cause a synchronous OnPaint()
3) Are any other calls to handlers made synchronously (like mouse moves or
mouse up/down, etc)?
form:
1) When I perform a BeginInvoke on a delegate in my own thread (actually the
main GUI thread) in the midst of a message event handler (say OnMouseUp),
does the implementation basically work the same as the BeginInvoke from
another thread, i.e., a message is posted, the event handler completes
execution, then when the message is dequeued, the target method is invoked?
2) Is there a complete list of how synchronous paint calls can be generated?
I know that doing an Invalidate() simply queues a paint message, but adding
an Update() causes a synchronous paint message. If my handler for the async
event absolutely needs to know that OnPaint(0 is not entered while it is
doing it's work, what else could it do incorrectly, (besides calling
Update()) that could cause a synchronous OnPaint()
3) Are any other calls to handlers made synchronously (like mouse moves or
mouse up/down, etc)?