Click to See Complete Forum and Search --> : PICTURE BOX


SAKYA
October 14th, 2001, 06:36 AM
I am working on an application which allows the user to draw on a picture box and then save the work as a file with a special extention name.The applacation provides the user with an option to clear the picture box completely for which i used the cls method of the picture box (picture1.cls).It works very fine but the following is the problem that i m facing.

If i draw something and save that as a file and then close the application and open the file again, the code to clear the picture box is not able to clear the previously saved portion but it clears anything drawn fresh.Means if i drew a circle, save it, reopen the file and draw a new line, the code to clear the picture box , now, clears the line but not the circle.

Then i changed the code and used the paintpicture method but the result is the same.
Can someone explain to me why it is happenning and what is the solution? The autoredraw property of the picturebox is set to false.Thanks in advance to any reply.

John G Duffy
October 14th, 2001, 10:57 AM
Picture1.cls clears text and drawing objects which are produced in the "Image" portion of a pictureBox
Picture1.Picture = LoadPicture() 'will clear the loaded picture which is loaded in the "picture" portion of a picturebox

John G