any other way of removing or moving the shapes drawn on the image of picture box


Active member
Mar 6, 2019
Programming Experience
1.I have picture box and loaded a image to it.
2.when a user draws a shape on the picture box I will store coordinates of the shape and drawn on the loaded image.
3. Now I have updated the project with moving shapes feature on picture box and when user moves the shapes of the picture box image , I know the translated coordinates and original shape coordinates how to remove the original shape of the image of the picture box and draw translated shape(moved shape) easily.
4. I'm thinking like updating the old shape coordinates with the new coordinates and redrawing all the shapes of the image of the picture box, there are any out of box function in c# to do this?
What you're asking for is not possible. If you draw on an Image then that's permanent. Just draw on the control instead, which is not permanent. Anything you draw on the control had to be redrawn on every Paint event so, to change what's drawn, you simply change the data that controls the drawing and then force a repaint. You can do that as many times as you like and then, if you need to make it permanent some time, draw on the Image then. Check out this simple example.
Top Bottom