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. Flicker-Free Control Refreshing (VB.NET)

Flicker-Free Control Refreshing (VB.NET)

Scheduled Pinned Locked Moved Visual Basic
csharpphpdatabasetutorial
4 Posts 4 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
    jacobjordan
    wrote on last edited by
    #1

    I don't even know if anyone will have any idea how to do this. I am having trouble when i invalidate a control, it will update but will flicker in the process. Is there any way to do something like suspend the control from updating on the screen until after it has fully refreshed? I know there must be some way to do what i am wanting.

    if (your.Life != lifestyles.Programming) { me.Hate(your.Life) = true; } Do not click this link

    D T 2 Replies Last reply
    0
    • J jacobjordan

      I don't even know if anyone will have any idea how to do this. I am having trouble when i invalidate a control, it will update but will flicker in the process. Is there any way to do something like suspend the control from updating on the screen until after it has fully refreshed? I know there must be some way to do what i am wanting.

      if (your.Life != lifestyles.Programming) { me.Hate(your.Life) = true; } Do not click this link

      D Offline
      D Offline
      darkelv
      wrote on last edited by
      #2

      Do SuspenseLayout and ResumeLayout help?

      M 1 Reply Last reply
      0
      • D darkelv

        Do SuspenseLayout and ResumeLayout help?

        M Offline
        M Offline
        Mycroft Holmes
        wrote on last edited by
        #3

        I think you still get the flicker when you resume. Be sure this is not when you close a dialog, 1.0 and 1.1 (and it may still be there) had a dramatic flicker if you use the DialogResult to manage the closing of a dialog, always explicitly close a dialog.

        Never underestimate the power of human stupidity RAH

        1 Reply Last reply
        0
        • J jacobjordan

          I don't even know if anyone will have any idea how to do this. I am having trouble when i invalidate a control, it will update but will flicker in the process. Is there any way to do something like suspend the control from updating on the screen until after it has fully refreshed? I know there must be some way to do what i am wanting.

          if (your.Life != lifestyles.Programming) { me.Hate(your.Life) = true; } Do not click this link

          T Offline
          T Offline
          Thomas Stockwell
          wrote on last edited by
          #4

          A few suggestions:

          • Only do paint routines in the proper painting events (OnPaint). Do not alter the painting in mouse events or any other events.
          • Use the SetStyle of custom controls to allow for DoubleBuffering/more precise painting control/paint event mapping. DoubleBuffering is a key in reducing flickering.
          • This sort of ties with my first point, but be sure that your logic is separate from your actual painting. One of my articles Basics of Falling Blocks in VB 2005[^] has helped many people reduce flickering in their programs because of the painting concepts discussed.

          Regards, Thomas Stockwell Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. Visit my homepage Oracle Studios Discounted or Free Software for Students: DreamSpark - downloads.channel8.msdn.com MSDN Academic Alliance - www.msdnaa.com

          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