为什么我在load里面用Graphics画的线显示不出来,然后我又建了一个表,用Button时间下同样的代码点击却显示出来了呢?代码如下:
Graphics graphics1 = this.CreateGraphics();
Graphics graphics2 = this.CreateGraphics();
Graphics graphics3 = this.CreateGraphics();
Graphics graphics4 = this.CreateGraphics();
Pen blackPen = new Pen(Color.Black, 1); //实例化Pen类
Point point1 = new Point(60, 150); //实例化一个Point类
Point point2 = new Point(560, 150); //再实例化一个Point类
Point point3 = new Point(62, 137); //实例化一个Point类
Point point4 = new Point(551, 137);
graphics1.DrawLine(blackPen, point1, point2);
graphics2.DrawLine(blackPen, point3, point4);
Graphics graphics1 = this.CreateGraphics();
Graphics graphics2 = this.CreateGraphics();
Graphics graphics3 = this.CreateGraphics();
Graphics graphics4 = this.CreateGraphics();
Pen blackPen = new Pen(Color.Black, 1); //实例化Pen类
Point point1 = new Point(60, 150); //实例化一个Point类
Point point2 = new Point(560, 150); //再实例化一个Point类
Point point3 = new Point(62, 137); //实例化一个Point类
Point point4 = new Point(551, 137);
graphics1.DrawLine(blackPen, point1, point2);
graphics2.DrawLine(blackPen, point3, point4);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货