Controls Flickering?
Posted: Sat Jan 07, 2017 1:48 pm
Hello,
We have created our own controls and seems after run
we gets white flickering loading the forms
All our controls have the same code:
Thanks
We have created our own controls and seems after run
we gets white flickering loading the forms
All our controls have the same code:
Code: Select all
Protected Overrides Sub OnCreateControl()
MyBase.OnCreateControl()
Try
ParentForm.FormBorderStyle = FormBorderStyle.None
ParentForm.AllowTransparency = False
ParentForm.TransparencyKey = Color.Fuchsia
ParentForm.FindForm.StartPosition = FormStartPosition.CenterScreen
Catch ex As Exception
End Try
DoubleBuffered = True
Dock = DockStyle.Fill
TabStop = False
Invalidate()
End Sub
Code: Select all
anyone has a new solution please?Sub New()
Me.SetStyle(ControlStyles.AllPaintingInWmPaint Or ControlStyles.OptimizedDoubleBuffer, True)
Me.SetStyle(ControlStyles.ResizeRedraw, True)
Me.SetStyle(ControlStyles.DoubleBuffer, True)
SetStyle(ControlStyles.UserPaint Or ControlStyles.SupportsTransparentBackColor, True)
Font = New Font("Segoe UI", 9)
End Sub
Thanks