[Mono-list] OnPaint with double buffering

Jonathan Pobst monkey at jpobst.com
Wed Sep 26 15:38:17 EDT 2007


No, it is not a known issue.  Please file a bug for it.

Jonathan


Jansen Bart wrote:
> Hi all,
> 
> It seems that the OnPaint method is not called correctly on UserControls
> when using double buffering.
> 
> See code below: if the two lines are uncommented, the "control painted"
> text is not shown after minimizing/maximizing for instance.  Without
> double buffering the text is shown correctly.
> 
> Is this a known issue? If not, I'll file a bug report ...
> 
> public class MyControl : UserControl
>     {
>         public MyControl()
>         {
>             this.Size = new Size(100, 100);
>             this.BackColor = Color.Green;
> 
>             //SetStyle(ControlStyles.OptimizedDoubleBuffer, true); // do
> double buffering
>             //SetStyle(ControlStyles.AllPaintingInWmPaint, true);
>         }
> 
>         protected override void OnPaint(PaintEventArgs e)
>         {
>             Console.WriteLine("control painted");
>         }
>     }
> 
> Bart
> _______________________________________________
> Mono-list maillist  -  Mono-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
> 
> 



More information about the Mono-list mailing list