110,537
社区成员
发帖
与我相关
我的任务
分享
private void huazhixian_Click(object sender, EventArgs e)
{
float i = 1F;
Pen pen = new Pen(Color.Red, i);
System.Drawing.Graphics g = this.CreateGraphics();
g.DrawLine(pen, new Point(30,30), new Point(200,30));
}
private void huashizhi(Point p)
{
int m = p.X;
int n = p.Y;
float i = 1F;
Pen pen = new Pen(Color.Blue, i);
System.Drawing.Graphics g = this.CreateGraphics();
g.DrawLine(pen, new Point(p.X - 50, p.Y), new Point(p.X + 50, p.Y));
g.DrawLine(pen, new Point(p.X, p.Y - 50), new Point(p.X, p.Y + 50));
}
private void button1_Click(object sender, EventArgs e)
{
Point p=new Point(100,100);
huashizhi(p);
}
private void button2_Click(object sender, EventArgs e)
{
Point p = new Point(200, 200);
huashizhi(p);
??如何清楚上次的??
}