How to get rid of graph flicker?

  • Thread starter Thread starter Mehrdad
  • Start date Start date
M

Mehrdad

Hi all,

I am programing for a user controll which is refreshing every 0.05 of a
second. the client area is flickering. I used the below code in the
constructor:
--------------------------
SetStyle(ControlStyles.OptimizedDoubleBuffer |
ControlStyles.AllPaintingInWmPaint, true);
--------------------------
It made it so much better, but it is still flickering. Is there any other
way to completely get rid of it?

Thank you in advance,
Mehrdad
 
Thank you for your answer. Yes, I set the double buffering to true. I think
when the OnPaint methode is triggering, it clears the client area before
fetching the buffered information into it. Is it true? If yes, how can I
prevent it to clear?

Thanks again,
Mehrdad
 
Thank you for your answer. Yes, I set the double buffering to true. I
think when the OnPaint methode is triggering, it clears the client area
before fetching the buffered information into it. Is it true? If yes, how
can I prevent it to clear?

I'm not sure about this, but I seem to remember something about overriding
OnPaintBackground with a method that does nothing.

Chris Jobson
 
Thank you very much,

Actually, as a part of a project, I am creating a histogram component which
its graphs should be as soft as possible.

Thank you for your complete answer :)
Mehrdad
 
Back
Top