Blinking of the panel with transparency backcolor

infuzo

New member
Joined
May 12, 2012
Messages
4
Location
Ukraine, Kyev and Nikopol
Programming Experience
3-5
Hello all, I need to solving problem with my graphic application. The fact is that Panel have transparency backcolor and .png backimage. And when i work Visible\Invisible this panel form terrible blinking. DoubleBuffer is true.
 
Hi Infuzo,

setting the DoubleBuffer = true will not actually do it. So inorder for DoubleBuffer to work on your panel create a class and call it something like DoubleBufferPanel

in that class add this code

Public Class DoubleBufferPanel
Inherits Panel


Public Sub New()


Me.DoubleBuffered = True
SetStyle(ControlStyles.AllPaintingInWmPaint, True)
SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
UpdateStyles()


End Sub


End Class

then build your application, and find your DoubleBufferPanel in the Toolbox and use that instead. That will remove all your flickering for the Panel

Gunze
 
Back
Top