Discussion:
Form slow to repaint after closing modal dialog
(too old to reply)
Dennis
2013-08-29 16:41:06 UTC
Permalink
In VS2005, my VB.Net app opens a small modal dialog (centered on parent
form with a spinning wheel and a little text) to indicate that a file is
being loaded. The dialog stays visible for a couple of seconds and then
closes.

My problem is that, when the dialog closes, the underlying controls
appear slow to repaint. i.e. my dialog seems to disappear from the
screen a little at a time. It is on the borderline of being noticeable.

I am wondering if anyone has any suggestions on how to make things speed
up a little. I already have my main form and the dialog double-buffered.

Thanks for any suggestions...
--
Dennis
Onur Güzel
2016-08-29 22:24:36 UTC
Permalink
Post by Dennis
In VS2005, my VB.Net app opens a small modal dialog (centered on parent
form with a spinning wheel and a little text) to indicate that a file is
being loaded. The dialog stays visible for a couple of seconds and then
closes.
My problem is that, when the dialog closes, the underlying controls
appear slow to repaint. i.e. my dialog seems to disappear from the
screen a little at a time. It is on the borderline of being noticeable.
I am wondering if anyone has any suggestions on how to make things speed
up a little. I already have my main form and the dialog double-buffered.
Thanks for any suggestions...
--
Dennis
You need to use Refresh() and Update() methods at the same time for the invalidation to handle WM_PAINT.

Thanks,

Onur

Loading...