Point[] pt=new Point[5];
pt[0] = new Point(150,50);
pt[1] = new Point(50,100);
pt[2] = new Point(100, 200);
pt[3] = new Point(200, 200);
pt[4] = new Point(250, 100);
PathGradientBrush myPGB = new PathGradientBrush(pt);
Graphics myGP = e.Graphics;
myGP.FillRectangle(myPGB,10,10,280,250);
myGP.DrawRectangle(new Pen(Color.Blue),10,10,280,250);