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 ;
LinearGradientB rush gradientBrush = new LinearGradientB rush(r,
Color.Navy, Color.Chocolate , LinearGradientM ode.ForwardDiag onal);
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 ;
LinearGradientB rush gradientBrush = new LinearGradientB rush(r,
Color.Navy, Color.Chocolate , LinearGradientM ode.ForwardDiag onal);
g.FillRectangle (gradientBrush, r);
}
Comment