直接看代码吧
private void button1_Click(object sender, EventArgs e)
{
Graphics g = pictureBox1.CreateGraphics();
g.DrawLine(new Pen (System .Drawing .Color .Black ,3), new Point(116, 67), new Point(216,67));//X轴
}
就这么两行代码,刚才还有显示,现在就不能显示了,求解!!!
------解决方案--------------------
在pictureBox1 Paint事件处理绘制