Friday, May 27, 2011

Flicker free controls: GroupBox

.Net Flicker Fee Controls

Here are the steps to use this control:
1. Add new class "NonFlickerGroupBox" to your C# application.
2. Replace autogenerated class code with C# code shown below.
3. Use NonFlickerGroupBox object instead of GroupBox object in your application.

public partial class NonFlickerGroupBox : GroupBox
{
        public NonFlickerGroupBox() : base()
       {
                   this.SetStyle(ControlStyles.AllPaintingInWmPaint,
                                       ControlStyles.UserPaint
                                       ControlStyles.OptimizedDoubleBuffer,
                                       true);
       }
}

Fell free to post any query.

No comments:

Post a Comment