Label repaint issue
-
hi, I am moving a label based on a timer's tick event. Now the problem is when label repaints (after i move its location), its not moving smoothly as it should be. Am I missing some property or something. Help me out.
-
hi, I am moving a label based on a timer's tick event. Now the problem is when label repaints (after i move its location), its not moving smoothly as it should be. Am I missing some property or something. Help me out.
SetStyle is a method on your form, there's a couple of styles you set to fully turn on double buffering. Me.SetStyle(ControlStyles.ResizeRedraw, True) Me.SetStyle(ControlStyles.DoubleBuffer, True) Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
SetStyle is a method on your form, there's a couple of styles you set to fully turn on double buffering. Me.SetStyle(ControlStyles.ResizeRedraw, True) Me.SetStyle(ControlStyles.DoubleBuffer, True) Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True)
Christian Graus Please read this if you don't understand the answer I've given you "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
its still sticking. i have a usercontrol which is moving my label (inside usercontrol) and i have call these methods (setstyle) in both cases (on form and on usercontrol), but still having same problem. i have also set DoubledBuffered to true. the usercontrol is like our news ticker. and one important thing, the timer's interval is between 15 to 25 and i am moving label of 3 pixel.