You want to use Graphics.FillRectangle with a LinearGradientBrush:
private void statusBarDrawItem(object sender,
StatusBarDrawItemEventArgs e)
{
// Should consider caching this brush for better performance.
LinearGradientBrush gradient = new LinearGradientBrush(
e.Bounds, Color.Blue, e.BackColor, LinearGradientMode.Horizontal);
e.Graphics.FillRectangle(gradient, e.Bounds);
// Draw lines and strings after the background, of course.
}
Microsoft MVP, Visual C# My Articles