Armin,
Curious, I am running WinXP and am using Refresh and it IS updating the
screen and I am not using DoEvents. ;-)
However I am not blocking the windows message queue, I'm in the middle of
dragging the mouse which is flooding the windows message queue with mouse
messages, not allowing the Paint message to be seen. Hence needing Refresh
over just invalidate. In other words threads & do events are not appropriate
in my case. I do use just invalidate in some other places as I do not need
to update the screen immediately...
Do you have a (more) specific link that you are referring to? The one I
found was titled "About Messages and Message Queues", I didn't realize that
XP used a ghost window when you app is hung (i.e. its blocking reading the
windows message queue).
Calling Doevents (or coming up for air as I sometimes say) was a good idea
even in previous versions of Windows. At the very least it allows you to
display a cancel button, so the user can cancel the operation.
Thanks for the additional info.
Jay
"Armin Zingler" <az*******@freenet.de> wrote in message
news:uZ**************@TK2MSFTNGP10.phx.gbl...
"Michel" <mr******@ifrance.com> schrieb How to force the redrawing of a Form?
In addition to Jay's reply: This does work but pay attention when using
WinXP. The window/Form doesn't update after a few seconds even if you call
Refresh! Unfortunatelly, there's no way to force the update. The name for
this annoying "feature" in WinXP is called "ghost window". Search MSDN for
this term. On WinXP, you are now forced to execute Application.Doevents or
put the work in another thread. Both solutions may lead to a lot of more
work than in previous OSes.
--
Armin