private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Pen pen2 = new Pen(Color.Black, 2);
g.DrawLine(pen2, 120, 100, 120, 350);
g.DrawLine(pen2, 120, 350, 370, 350);
Pen p = new Pen(Color.Blue, 2);
p.DashStyle = System.Drawing.Drawing2D.DashStyle.Dash;
g.DrawLine(p, 370, 100, 370, 350);
Pen pen3 = new Pen(Color.Black, 5);
g.DrawEllipse(pen3, 150, 368, 2, 2);
Pen pen4 = new Pen(Color.Red, 5);
g.DrawEllipse(pen4, 250, 368, 2, 2);
}
这样就可以啦。追问只有黑色和蓝色两条纵坐标轴其它的不见了
追答你的PictureBox的大小要足够大赛,小了,你肯定看不到。