Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How can I clear a portion of a page in a printdocument

How can I clear a portion of a page in a printdocument

Scheduled Pinned Locked Moved Visual Basic
graphicsquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JR212
    wrote on last edited by
    #1

    Hi, I want after printing on a location erase all graphics(lines, tekst, circles,...); Write now I use comething like this:

    e.Graphics.FillRectangle(Brushes.White, 300, 80, 220, 200)

    Is there a beter solution to do something like this. E.Graphics.clear clears everything. Jan

    D C 2 Replies Last reply
    0
    • J JR212

      Hi, I want after printing on a location erase all graphics(lines, tekst, circles,...); Write now I use comething like this:

      e.Graphics.FillRectangle(Brushes.White, 300, 80, 220, 200)

      Is there a beter solution to do something like this. E.Graphics.clear clears everything. Jan

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      Don't draw them in the first place?? If they are already on the "page", then you either have to draw those object exactly as before, only in white, or you have to do what you did here.

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak

      J 1 Reply Last reply
      0
      • D Dave Kreskowiak

        Don't draw them in the first place?? If they are already on the "page", then you either have to draw those object exactly as before, only in white, or you have to do what you did here.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak

        J Offline
        J Offline
        JR212
        wrote on last edited by
        #3

        Thanks Dave, I keep it this way. I clarify why. I had a report and now I want to add something. I’m to lazy to add some condition do I print the old or new info. So If I want the new info. I clear the already printed info and write on top of the clear portion Jan

        D 1 Reply Last reply
        0
        • J JR212

          Thanks Dave, I keep it this way. I clarify why. I had a report and now I want to add something. I’m to lazy to add some condition do I print the old or new info. So If I want the new info. I clear the already printed info and write on top of the clear portion Jan

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          That doesn't change the answer. I've already given you what your options are.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak

          J 1 Reply Last reply
          0
          • D Dave Kreskowiak

            That doesn't change the answer. I've already given you what your options are.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak

            J Offline
            J Offline
            JR212
            wrote on last edited by
            #5

            And I say thanks. I just have clearefy why I want it

            1 Reply Last reply
            0
            • J JR212

              Hi, I want after printing on a location erase all graphics(lines, tekst, circles,...); Write now I use comething like this:

              e.Graphics.FillRectangle(Brushes.White, 300, 80, 220, 200)

              Is there a beter solution to do something like this. E.Graphics.clear clears everything. Jan

              C Offline
              C Offline
              Chris Trelawny Ross
              wrote on last edited by
              #6

              If you're able to edit the code that renders the content you want to clear, perhaps you could adjust the clip rect before the 'content to be cleared' is drawn - thus in effect not drawing it (but leaving the paint method relatively unchanged)?

              J 1 Reply Last reply
              0
              • C Chris Trelawny Ross

                If you're able to edit the code that renders the content you want to clear, perhaps you could adjust the clip rect before the 'content to be cleared' is drawn - thus in effect not drawing it (but leaving the paint method relatively unchanged)?

                J Offline
                J Offline
                JR212
                wrote on last edited by
                #7

                This looks interresting but how can I do something that? It sounds like something like screen in the good old days of GW basic but I have never found this in VB.net Jan

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups