aewarnick Posted June 22, 2003 Posted June 22, 2003 Does this.SetStyle(ControlStyles.DoubleBuffer, true); this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); automatically draw the object to the background and then show it to the screen; therefore eliminating the need to draw a backbuffer like in C++? Quote C#
*Experts* Volte Posted June 22, 2003 *Experts* Posted June 22, 2003 You need to do all your painting in the OnPaint event though for it to be effective. Just call 'this.Invalidate()' to cause OnPaint to fire. Quote
aewarnick Posted June 23, 2003 Author Posted June 23, 2003 That sure makes things aaaaaalllllot easier. Thanks. Quote C#
aewarnick Posted June 24, 2003 Author Posted June 24, 2003 Another good question. What is the point or advantage of setting the AllPaintingInWmPaint flag when DoubleBuffer should be enouph. It just does not make sense to me yet. And if you set AllPaintingInWmPaint you must also set UserPaint as well! What is the advantage of declaring more than DoubleBuffer? Quote C#
*Experts* mutant Posted June 24, 2003 *Experts* Posted June 24, 2003 If you set AllPaintingInWmPaint you should set UserPaint to true too. AllPaintingInWmPaint prevents the background from being earased so it reduces flicker. Quote
*Experts* Volte Posted June 24, 2003 *Experts* Posted June 24, 2003 Just be careful about that one, though, as setting UserPaint to true on an already existing control will cause Windows to completely ignore it when it goes about painting your form; it will just be a small patch of garbled image and you'll need to do *all* of the control's painting yourself. Quote
aewarnick Posted June 24, 2003 Author Posted June 24, 2003 But I have to set UserPaint to true don't I (that is, if I set AllPaintingInWmPaint to true)? Quote C#
*Experts* mutant Posted June 24, 2003 *Experts* Posted June 24, 2003 You should set UserPaint to true if you use AllPaintinginWM. Quote
aewarnick Posted June 24, 2003 Author Posted June 24, 2003 I know that is what the documentation says. Thanks! Quote C#
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.