Panel drawing problem

  • Thread starter Thread starter jon morgan
  • Start date Start date
J

jon morgan

Hi,

I have a number of panels on a form into which I draw graphs directly.

When one of the panels is updated I can see from Spy that WM_PAINT and
WM_ERASEBACKGRD messages are sent to some, but not all, of the other visible
panels. There seems to be no way of predicting which panels get invalidated
in this way and it causes unnecessary flicker.

How do I ensure only the panel that is updated gets re-painted ?

BTW all drawing is done using double buffering, all panels intercept and
cancel the background paint message, and I have alternatively tried using
SetStyles to no effect.

Thanks for any help


Jon
 
Can you post a compilable sample that demostrates the problem?
 
Hello again Stoitcho,

No need - I solved the problem which was caused by some sloppy event
handling in the dataset. But thanks anyway.

Regards


Jon

Stoitcho Goutsev (100) said:
Can you post a compilable sample that demostrates the problem?


--
Stoitcho Goutsev (100) [C# MVP]

jon morgan said:
Hi,

I have a number of panels on a form into which I draw graphs directly.

When one of the panels is updated I can see from Spy that WM_PAINT and
WM_ERASEBACKGRD messages are sent to some, but not all, of the other
visible panels. There seems to be no way of predicting which panels get
invalidated in this way and it causes unnecessary flicker.

How do I ensure only the panel that is updated gets re-painted ?

BTW all drawing is done using double buffering, all panels intercept and
cancel the background paint message, and I have alternatively tried using
SetStyles to no effect.

Thanks for any help


Jon
 
Back
Top