Hello,I have a function that draws a rectangle on a form (different widths and heights)
public void drawRectangle()
{
Graphics g = pictureBox1.CreateGraphics();
Rectangle rect = new Rectangle(50, 50, 60, 50);
g.DrawRectangle(Pens.Black, 10, 10, 10, 10);
}
I have a picturebox called picturebox1 but how would I get the rectangle to display in the picture box?
Thanks =)