private void Form1_Paint(object sender,System.Windows.Forms.PaintEventArgs e)
{
LinearGradientBrush linGrBrush = new LinearGradientBrush(new Point(0,0),
new Point(200,100),
Color.FromArgb(255,0,255,0),Color.FromArgb(255,0,255,0));
Pen pen=new Pen(linGrBrush,10);
e.Graphics.DrawLine(pen,32,48,100,200);
e.Graphics.FillEllipse(linGrBrush,10,100,200,100);
}
我用的是这些代码,我是按照一个例子抄的,他的代码里面也没涉及到覆盖系统中的OnPaint的东西。
让我找了半天错也没找出来~·