Search code examples
c#picturebox

How do I draw a circle and line in the picturebox?


How do I draw a circle and line in the picturebox?


Solution

  • the picturebox is a control and has an image as source - so you have to draw on the image and hand the image to the control to show it

    MyImage = new Bitmap(fileToDisplay);
    pictureBox1.ClientSize = new Size(xSize, ySize);
    pictureBox1.Image = MyImage;