lothos12345 Posted October 25, 2005 Posted October 25, 2005 I have developed a Visual Basic.NET application, with a picture box on the main form. I user aquires and image and it loads into the PictureBox, the User can then draw lines, rectangles etc.. using the mouse on the picture box image. The problem comes in when the user scrolls down on the image the marks they previously made disappear. How can I prevent this from happening? Any help is greatly appreciated. Quote
thenerd Posted October 25, 2005 Posted October 25, 2005 You want to store everything you draw onto a bitmap image that's not connected to the picturebox so it won't refresh and delete everything you drew. Basically: dim buff as bitmap = new bitmap(picturebox.width, picturebox.height) dim g as graphics = graphics.fromimage(buff) 'blah, use g to draw some stuff to buff instead of using it to draw to picturebox. picturebox.image = buff Or something similar to that. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.