Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

DoubleBufferPanel - How to

$
0
0

Hello, can anyone help me with the DoubleBufferPanel, how can i put it on a Form. I have an example of the code, where  DoubleBufferPanel is defined with a class like: 

private class DoubleBufferPanel : System.Windows.Forms.Panel
        {
            public DoubleBufferPanel()
            {
                this.SetStyle(System.Windows.Forms.ControlStyles.DoubleBuffer |
                    System.Windows.Forms.ControlStyles.UserPaint |
                    System.Windows.Forms.ControlStyles.AllPaintingInWmPaint, true);
                this.UpdateStyles();
            }
}

and defined like private MainForm.DoubleBufferPanel myImage;

it's defined in MainFormDesigner.cs, and when I open his form in designe mode, he has a myImageon form, and it's property is nameOfTheProject.MainForm+DoubeBufferPanel.

Can anyone explan to me, how can i add myImage type of MainForm.DoubleBufferPanelon a form.



Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>