using System.Drawing.Drawing2D; 使用LinearGradientBrush 类,使用沿渐变混合的两种颜色进行绘制;Graphics g = this.CreateGraphics(); LinearGradientBrush myBrush = new LinearGradientBrush(this.ClientRectangle,Color.Blue,Color.AliceBlue,90f); g.FillRectangle(myBrush, ClientRectangle); myBrush.Dispose();
建议你参考下这个东东
使用LinearGradientBrush 类,使用沿渐变混合的两种颜色进行绘制;Graphics g = this.CreateGraphics();
LinearGradientBrush myBrush = new LinearGradientBrush(this.ClientRectangle,Color.Blue,Color.AliceBlue,90f);
g.FillRectangle(myBrush, ClientRectangle);
myBrush.Dispose();
------------
哥们,我就这么写的,可是中间有个明显分界线。。