By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,857 Members | 1,768 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,857 IT Pros & Developers. It's quick & easy.

Resize Form and uninitialized memory

P: n/a
It looks like when I make a Form resizable and/or hit the maximize button
that it shows garbage (unitialized memory) for the new portions of the form
and then fills it in with background color. It only shows it very briefly,
but it's VERY visible during this time.

This happens with re-sizable forms too. And it 'feels' like re-sizing is
'jerky'; that is, lags a bit from my actions. I turn off visiblity to the
controls on the form while beginning re-sizing to help matters, and then
make them visible again when the re-sizing ends).

I've tried updating with and without using "Paint-only" (by way of
ControlStyles::AllPaintingInWmPaint). I also use the DoubleBuffered setting
(which I use for no Graphics drawing flicker).

For context, VS C++.NET 2005 Express using clr:/pure syntax.

[==P==]
Dec 10 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"Peteroid" <pe************@msn.com> wrote in message
news:ex**************@TK2MSFTNGP14.phx.gbl...
It looks like when I make a Form resizable and/or hit the maximize button
that it shows garbage (unitialized memory) for the new portions of the
form and then fills it in with background color. It only shows it very
briefly, but it's VERY visible during this time.


What you are seeing is result of the low prioritization of the paint
message.

When you resize the form, a portion is marked "invalid", i.e. in need of a
paint job.

When higher priority messages (like the ones related to sizing and movement)
are removed from the queue, the invalid portions of the form ar repainted.

Try adding an OnResize() overload to your form's class and calling Refresh()
or Invalidate().

Regards,
Will

Dec 10 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.