.Net Flicker Fee Controls
Here are the steps to use this control:
1. Add new class "NonFlickerSplitContainer" to your C# application.
2. Replace auto generated class code with C# code shown below.
3. Use NonFlickerSplitContainer object instead of SplitContainer object in your application.
public partial class NonFlickerSplitContainer : SplitContainer
{
public NonFlickerSplitContainer()
{
this.SetStyle(ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer, true);
MethodInfo objMethodInfo = typeof(Control).GetMethod( "SetStyle",BindingFlags.NonPublic|BindingFlags.Instance);
object[] objArgs = new object[] { ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer, true };
objMethodInfo.Invoke(this.Panel1, objArgs);
objMethodInfo.Invoke(this.Panel2, objArgs);
}
}
Here are the steps to use this control:
1. Add new class "NonFlickerSplitContainer" to your C# application.
2. Replace auto generated class code with C# code shown below.
3. Use NonFlickerSplitContainer object instead of SplitContainer object in your application.
public partial class NonFlickerSplitContainer : SplitContainer
{
public NonFlickerSplitContainer()
{
this.SetStyle(ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer, true);
MethodInfo objMethodInfo = typeof(Control).GetMethod( "SetStyle",BindingFlags.NonPublic|BindingFlags.Instance);
object[] objArgs = new object[] { ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer, true };
objMethodInfo.Invoke(this.Panel1, objArgs);
objMethodInfo.Invoke(this.Panel2, objArgs);
}
}