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. C#
  4. Invalidate and redraw

Invalidate and redraw

Scheduled Pinned Locked Moved C#
helpquestion
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.
  • A Offline
    A Offline
    AlexB47
    wrote on last edited by
    #1

    Hi all, i use, to move a circle in a panel (in a form), a code line such as this: Grapichs e; for(...) { panel.Invalidate(new Rect(list[i-1].x,list[i-1].y,list[i-1].widht,list[i-1].height)); e.DrawEllipse(list[i].x,list[i].y,list[i].widht,list[i].height); } can you help me with a solution that resolve a flicker problem? Is possible to create a doublebuffer in a panel object? Thanks.

    Alex

    J L 2 Replies Last reply
    0
    • A AlexB47

      Hi all, i use, to move a circle in a panel (in a form), a code line such as this: Grapichs e; for(...) { panel.Invalidate(new Rect(list[i-1].x,list[i-1].y,list[i-1].widht,list[i-1].height)); e.DrawEllipse(list[i].x,list[i].y,list[i].widht,list[i].height); } can you help me with a solution that resolve a flicker problem? Is possible to create a doublebuffer in a panel object? Thanks.

      Alex

      J Offline
      J Offline
      Jimmanuel
      wrote on last edited by
      #2

      AlexB47 wrote:

      Is possible to create a doublebuffer in a panel object?

      Yes. Create a class that inherits from Panel and in the constructor you can set this.DoubleBuffered to true. :badger:

      A 1 Reply Last reply
      0
      • J Jimmanuel

        AlexB47 wrote:

        Is possible to create a doublebuffer in a panel object?

        Yes. Create a class that inherits from Panel and in the constructor you can set this.DoubleBuffered to true. :badger:

        A Offline
        A Offline
        AlexB47
        wrote on last edited by
        #3

        Can you help me with example? I use a panel object with "drag and drop" from toolbar into form (I'm novice programmer in C#). Thanks a lot!

        Alex

        J 1 Reply Last reply
        0
        • A AlexB47

          Hi all, i use, to move a circle in a panel (in a form), a code line such as this: Grapichs e; for(...) { panel.Invalidate(new Rect(list[i-1].x,list[i-1].y,list[i-1].widht,list[i-1].height)); e.DrawEllipse(list[i].x,list[i].y,list[i].widht,list[i].height); } can you help me with a solution that resolve a flicker problem? Is possible to create a doublebuffer in a panel object? Thanks.

          Alex

          L Offline
          L Offline
          Luc Pattyn
          wrote on last edited by
          #4

          Hi, this[^] has all you need. :)

          Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


          Merry Christmas and a Happy New Year to all.


          A 1 Reply Last reply
          0
          • A AlexB47

            Can you help me with example? I use a panel object with "drag and drop" from toolbar into form (I'm novice programmer in C#). Thanks a lot!

            Alex

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

            Well, I was about to reply with an example but as usual, Luc already has one handy :) :badger:

            1 Reply Last reply
            0
            • L Luc Pattyn

              Hi, this[^] has all you need. :)

              Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


              Merry Christmas and a Happy New Year to all.


              A Offline
              A Offline
              AlexB47
              wrote on last edited by
              #6

              Good ... I test this solution! Many Thanks! :)

              Alex

              L 1 Reply Last reply
              0
              • A AlexB47

                Good ... I test this solution! Many Thanks! :)

                Alex

                L Offline
                L Offline
                Luc Pattyn
                wrote on last edited by
                #7

                you're welcome. :)

                Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]


                Merry Christmas and a Happy New Year to all.


                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