在C#的形式我创建了一个新的油漆方法:
private void thisPolygon(PaintEventArgs e)
{
Pen clrBlue = new Pen(Color.Blue, 3);
Point[] Wst = new Point[5];
Wst[0] = new Point(20, 350);
Wst[1] = new Point(110, 200);
Wst[2] = new Point(200, 190);
Wst[3] = new Point(210, 275);
Wst[4] = new Point(190, 400);
Wst[5] = new Point(50, 390);
e.Graphics.DrawPolygon(clrBlue, Wst);
}
现在,我该如何称呼呢? 我不能让它工作,这不工作:
private void Form1_Load(object sender, EventArgs e)
{
thisPolygon(); ///I've tried adding some stuff in brackets area, failed.
}