Problem - Creating Circle in Picture Box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • furqanms
    New Member
    • Jun 2007
    • 17

    Problem - Creating Circle in Picture Box

    Hello

    I want to create a circle in picture box.I am trying to do the same but not getting the right output.

    The code is as follow :

    pictureBox1.Hei ght = 200;
    pictureBox1.Wid th = 200;
    pictureBox1.Bor derStyle = BorderStyle.Fix edSingle;
    Graphics g = pictureBox1.Cre ateGraphics();
    Rectangle rect = new Rectangle(0,0, 200, 200);
    g.DrawEllipse(P ens.Black , rect);



    So please help me to come out with this problem.

    Thanking you in advanced.
  • NitinSawant
    Contributor
    • Oct 2007
    • 271

    #2
    To draw circle you should use paint event of the picturebox object

    Comment

    Working...