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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. stopping "flickering effect"

stopping "flickering effect"

Scheduled Pinned Locked Moved C#
helpquestioncareer
2 Posts 2 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.
  • S Offline
    S Offline
    Stephan Wright
    wrote on last edited by
    #1

    Hy everyone! I do have a problem with my application: I do want to change the appearence of my application if the user wishes to. I do have a Windows.Forms and two User.Controls which are displayed. The user is able to select items from a combobox which might cause the displayed layout to change. When I do so then there is some kind of flickering. So I thought of freezing the layout until the changes are done. I did the following this.SuspendLayout(); // do the changes, display new data etc. this.ResumeLayout(false); well but the flickering is still there. The one control is a "single" control but the second one consists of one or more being placed on top of each other with the visibleoption displaying one at a time. Is the "overlaying" of the controls the reason? Because I thought as long as I do set the Windows.Forms to SuspendLayout everything in there is freezed until I do call ResumeLayout. But I am not sure if this includes the controls as well, which are added or deleted dynamically. Or do I have to suspend and then resume every element (meaning the controls) as well? Does anyone of you have an idea, what might be wrong in here? Thanks! Stephan.

    C 1 Reply Last reply
    0
    • S Stephan Wright

      Hy everyone! I do have a problem with my application: I do want to change the appearence of my application if the user wishes to. I do have a Windows.Forms and two User.Controls which are displayed. The user is able to select items from a combobox which might cause the displayed layout to change. When I do so then there is some kind of flickering. So I thought of freezing the layout until the changes are done. I did the following this.SuspendLayout(); // do the changes, display new data etc. this.ResumeLayout(false); well but the flickering is still there. The one control is a "single" control but the second one consists of one or more being placed on top of each other with the visibleoption displaying one at a time. Is the "overlaying" of the controls the reason? Because I thought as long as I do set the Windows.Forms to SuspendLayout everything in there is freezed until I do call ResumeLayout. But I am not sure if this includes the controls as well, which are added or deleted dynamically. Or do I have to suspend and then resume every element (meaning the controls) as well? Does anyone of you have an idea, what might be wrong in here? Thanks! Stephan.

      C Offline
      C Offline
      Corinna John
      wrote on last edited by
      #2

      Try placing the control in a panel. You can avoid flickering by hiding the panel and showing it when the new controls have been added: panelContainer.Hide(); //do the changes, display new data etc. panelContainer.Show(); You can put a "Please Wait..." label under panelContainer, so that the user sees a message until the control are visible again.

      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