|

楼主 |
发表于 2013-5-24 21:27:20
|
显示全部楼层
yangying 发表于 2013-5-24 20:27 
在这里调用你的重会的方法,你自己写的那个 - private void top() {
- Graphics g = this.pictureBox1.CreateGraphics();
- GraphicsPath path = new GraphicsPath();
- Pen pen = new Pen(Color.Black, 3);
- path.AddLine(new Point(0, 0), new Point(640, 0));
- path.AddLine(new Point(640, 0), new Point(500, 120));
- path.AddLine(new Point(500, 120), new Point(140, 120));
- path.AddLine(new Point(140, 120), new Point(0, 0));
- g.DrawPath(pen, path);
- }
复制代码- private void pictureBox1_Paint(object sender, PaintEventArgs e)
- {
- this.Invalidate();
- this.top();
- }
复制代码 这样么?
|
|