设置窗体渐变色背景图像,C#源代码RectangleMyRect=this.ClientRectangle;BitmapMyBmp=newBitmap(MyRect.Width,MyRect.Height);Graphicsg=Graphics.FromImage(MyBmp);LinearGradientBrushMyBrush=newLinearGradientBrush(MyRect,Color.Blue,Color.Black,LinearGradientMode.Horizontal);g.FillRectan