指出错误 关于GDI
程序代码:using System;
using System.Collections.Generic;
using using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace _5zq
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
}
private void Form_paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Pen pen = new Pen(Color.Red, 5);
Point point1 = new Point(300, 100);
Point point2=new Point(750,100);
Point point3 = new Point(300,600);
Point point4 = new Point(750, 600);
g.DrawLine(pen, point1,point2);
g.DrawLine(pen, point2, point3);
g.DrawLine(pen, point3, point4);
g.DrawLine(pen, point4, point1);
}
}
}
那里有错误啊 我总是显现不出我要画的内容









