CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: PICTURE BOX

  1. #1
    Join Date
    Jun 2000
    Posts
    104

    PICTURE BOX

    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.




  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: PICTURE BOX

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured