Hello,
I am making an application in vb.net 2012.
I have used split container, table layout panel and panels as container in my form.
I also have buttons, text boxes, tool strip,status strip,combo box, list view etc
the problem is when i load the form it flickers a lot. also when the list view columns width is changed while populating the list view it flickers and which doesn't look good. I have tried few solutions
1) i have set double buffered property to true
2) no container back color is transparent
3) to prevent flicker while loading i used suspendlayout() and resumelayout()
But it just reduced flicker a bit, its not completely gone.
Note: I have added images in table layout
Flicker Problem on form loading
Page 1 of 17 Replies - 690 Views - Last Post: 20 May 2013 - 01:57 AM
Replies To: Flicker Problem on form loading
#2
Re: Flicker Problem on form loading
Posted 05 October 2012 - 03:43 PM
if you have many controls with a transparent background then your going to see flicker. you have taken the right steps although there is one more. look into the onPaint event as this is called last.
Hope this helps
Kevin
Hope this helps
Kevin
#3
Re: Flicker Problem on form loading
Posted 06 October 2012 - 08:57 PM
thanks Kevin,
I have not added Paint event in my code anywhere,
so could you elaborate what should i try exactly.
I have not added Paint event in my code anywhere,
so could you elaborate what should i try exactly.
#4
Re: Flicker Problem on form loading
Posted 06 October 2012 - 09:34 PM
I cannot offer a better solution using WinForms, but I highly recommend WPF. It takes a little getting used to - and yet it will amaze you! Oh and you can do everything your wanting with it. Controls with transparency is one of it's specialties. I think am pretty much done with WinForms. Don't worry we have a forum for WPF here too!
#5
Re: Flicker Problem on form loading
Posted 06 October 2012 - 10:33 PM
Got any tutorials for WPF Hawk? There are plenty of articles out there, but any that do a better job than the rest, that ca you can recall?
#6
Re: Flicker Problem on form loading
Posted 07 October 2012 - 12:43 AM
thanks HAWK
yeah Travster344 getting proper tutorial for WPF can help a lot.
yeah Travster344 getting proper tutorial for WPF can help a lot.
#7
Re: Flicker Problem on form loading
Posted 16 October 2012 - 11:52 AM
Here are links for WPF.
http://wpftutorial.n...pfdevtools.html
http://www.codeproje...orial-Beginning
Hope it helps.
http://wpftutorial.n...pfdevtools.html
http://www.codeproje...orial-Beginning
Hope it helps.
#8
Re: Flicker Problem on form loading
Posted 20 May 2013 - 01:57 AM
I know this is an old thread, as I have been doing this in my windows forms with panels I thought id share the code 
remove flickering
remove flickering
'PREVENT FLICKERING
Protected Overloads Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
cp.ExStyle = cp.ExStyle Or 33554432
Return cp
End Get
End Property
Private Sub PreVentFlicker()
With Me
.SetStyle(ControlStyles.OptimizedDoubleBuffer, True)
.SetStyle(ControlStyles.UserPaint, True)
.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
.UpdateStyles()
End With
End Sub
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote



|