private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Pen pn = new Pen(Color.Blue);
Rectangle rect = new Rectangle(50, 50, 200, 100);
g.DrawArc(pn, rect, 12, 84);
}
But when I am adding the If statement to the code I cannot see any Arc on the form( there is no error in debugging but there is a problem with showing the results):
public int m=10;
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
if (m == 10)
{
Graphics g = e.Graphics;
Pen pn = new Pen(Color.Blue);
Rectangle rect = new Rectangle(50, 50, 200, 100);
g.DrawArc(pn, rect, 12, 84);
}
}