label backgrond flicking on a WinForms user control has background image enabled

Posted by slowlycooked on Stack Overflow See other posts from Stack Overflow or by slowlycooked
Published on 2010-03-16T12:05:27Z Indexed on 2010/03/16 13:16 UTC
Read the original article Hit count: 402

Filed under:
|

I am working on a windows form project and having some problem with UserControl Double Buffering. I created a usercontrol and has a background image, then on top of it I have few radio buttons and labels. Radio buttons and labels are all having transparent background as color. However, when I show and hide the User control, I can see the flickering on those labels and radio buttons that has transparent background.

And I tried

Me.SetStyle(ControlStyles.DoubleBuffer _
Or ControlStyles.AllPaintingInWmPaint _
Or ControlStyles.UserPaint _
Or ControlStyles.SupportsTransparentBackColor, _
True)

After initializeComponent() to enable double buffer on this user control, but it doesn’t seem to work.

© Stack Overflow or respective owner

Related posts about vb.net

Related posts about doublebuffered