R
Ryan
Why do I sometimes get this error; works fine most of the time:
Rectangle '{X=0,Y=0,Width=0,Height=0}' cannot have a width or height equal
to 0
void OnPaint(Object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Rectangle r = ClientRectangle;
LinearGradientBrush gradientBrush = new LinearGradientBrush(r,
Color.Navy, Color.Chocolate, LinearGradientMode.ForwardDiagonal);
g.FillRectangle(gradientBrush, r);
}
Rectangle '{X=0,Y=0,Width=0,Height=0}' cannot have a width or height equal
to 0
void OnPaint(Object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Rectangle r = ClientRectangle;
LinearGradientBrush gradientBrush = new LinearGradientBrush(r,
Color.Navy, Color.Chocolate, LinearGradientMode.ForwardDiagonal);
g.FillRectangle(gradientBrush, r);
}