Panel drawing problem

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
 
S

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

Can you post a compilable sample that demostrates the problem?
 
J

jon morgan

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top