how to draw.....

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nicolus
    New Member
    • Jul 2006
    • 1

    #1

    how to draw.....

    my problem is to draw a rectangle shape on the picturebox at execution time for that i wrote code which is working well in one project later i just copied that code to the project where i actually required then it's not working. :confused:

    i have one more problem that is i want to remove the rectangle which i drawn on the picturebox without changing anything of my picture which is there prior to the drawing rectangle. :(

    pls help me........

    thanks in advance.
    nicolus.
  • dab
    New Member
    • Aug 2006
    • 3

    #2
    I'm not sure if this will help, but resizing the window, usually clears the drawings on the image.

    Try the code:

    Code:
            Dim g As Graphics
            g = PictureBox1.CreateGraphics
            g.DrawRectangle(Pens.Black, 15, 15, 5, 5)
    Last edited by dab; Aug 3 '06, 03:09 AM. Reason: Fixed Code

    Comment

    Working...