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. stop refresh of drawing

stop refresh of drawing

Scheduled Pinned Locked Moved Visual Basic
graphicshelp
6 Posts 4 Posters 2 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.
  • A Offline
    A Offline
    amilapradeep
    wrote on last edited by
    #1

    i have to draw pie chart on my application run time.i used this way. create a graphic object and then draw lines. my problem is when from minimize or other form come over that from,drawing is refreshing(erasing) is there a way to prevent this.

    C D U 3 Replies Last reply
    0
    • A amilapradeep

      i have to draw pie chart on my application run time.i used this way. create a graphic object and then draw lines. my problem is when from minimize or other form come over that from,drawing is refreshing(erasing) is there a way to prevent this.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      No - you need instead to do it properly - draw it in your paint handler.

      Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

      D 1 Reply Last reply
      0
      • A amilapradeep

        i have to draw pie chart on my application run time.i used this way. create a graphic object and then draw lines. my problem is when from minimize or other form come over that from,drawing is refreshing(erasing) is there a way to prevent this.

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

        You don't stop this. You actually need to have this! When another window is dragged acrossed your chart, it has to repaint itself. Put all of your drawing code in the Paint event of the control you're drawing this chart on and it'll do just that.

        Dave Kreskowiak Microsoft MVP - Visual Basic

        1 Reply Last reply
        0
        • C Christian Graus

          No - you need instead to do it properly - draw it in your paint handler.

          Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

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

          I have no idea why some idiot voted you a 1...

          Dave Kreskowiak Microsoft MVP - Visual Basic

          C 1 Reply Last reply
          0
          • D Dave Kreskowiak

            I have no idea why some idiot voted you a 1...

            Dave Kreskowiak Microsoft MVP - Visual Basic

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            *grin* Good advice often attracts low votes, because what people want is a slab of code that works despite violating how Windows itself functions :-)

            Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog

            1 Reply Last reply
            0
            • A amilapradeep

              i have to draw pie chart on my application run time.i used this way. create a graphic object and then draw lines. my problem is when from minimize or other form come over that from,drawing is refreshing(erasing) is there a way to prevent this.

              U Offline
              U Offline
              Uber1
              wrote on last edited by
              #6

              Putting the code in the event is one way of doing it and probably the best way if your pie chart is constantly changing. Another way would be to create a bitmap object and set the image propertie to the bitmap and it windows will handle the redrawing for you but you should really try doing it the correct way.

              Recreating the wheel is the best way to appreciate what the previous coders have gone through to get you where you are at now.

              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