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

Thread: Erasing Lines

  1. #1
    Join Date
    May 2001
    Location
    Kansas City, Missouri
    Posts
    45

    Erasing Lines

    I'm writing a program that draws lines on a Picture control using the line method. Later, I need to be able to erase a line. Does anyone have a code example showing how to get access to a previously drawn line?

    Thanks in advance.
    Joe


  2. #2
    Join Date
    Jan 2001
    Posts
    165

    Re: Erasing Lines

    It is my understanding that when you use the line method to draw lines NO information is stored about the line. You can clear ALL lines by using the Clear method of the same object but I do not believe that you can access any particular line.

    I built an application that used the line method to draw and what I did was to store previous x,y locations in an array. Then I can use this array to find previous lines. To erase just one line: if you know the x,y locations just draw a new line over the old line using the background color of the object.

    -K


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