C# Programming
07-07-2009, 04:30 PM
Hi ,
Im using following code to get gradient color to my form background but when ever i resize(maximize) it is getting flickering. Any thoughts to get rid of this?
Brush brush; Rectangle rct;
rct = new Rectangle(0, 0, this.ClientSize.Width, this.ClientSize.Height);
Color obj = Color.FromArgb(45, 132, 198);
brush =
new LinearGradientBrush(
rct,
Color.White, obj,
LinearGradientMode.BackwardDiagonal);
e.Graphics.FillRectangle(brush, rct);
In Form resize
this.Invalidate();
Im using following code to get gradient color to my form background but when ever i resize(maximize) it is getting flickering. Any thoughts to get rid of this?
Brush brush; Rectangle rct;
rct = new Rectangle(0, 0, this.ClientSize.Width, this.ClientSize.Height);
Color obj = Color.FromArgb(45, 132, 198);
brush =
new LinearGradientBrush(
rct,
Color.White, obj,
LinearGradientMode.BackwardDiagonal);
e.Graphics.FillRectangle(brush, rct);
In Form resize
this.Invalidate();