📜  在picturebox上绘制c#代码示例

📅  最后修改于: 2022-03-11 14:49:23.750000             🧑  作者: Mango

代码示例1
private void pictureBox1_Paint(object sender, PaintEventArgs e)
    {
        e.Graphics.DrawLine(
            new Pen(Color.Red,2f), 
            new Point(0,0), 
            new Point(pictureBox1.Size.Width, pictureBox1.Size.Height ));

        e.Graphics.DrawEllipse(
            new Pen(Color.Red, 2f),
            0,0, pictureBox1.Size.Width, pictureBox1.Size.Height  );
    }