Suspend paints?


Is there a way to suspend paints?

I am trying to create an “opening drawer” type animation where when you push a button on a form, the form expands like an opening drawer. I’ve confirmed that just redrawing the form multiple times from a timer is too slow. However, I can capture the expanded form as an image and then draw portions of this image from a timer and it looks good.

To capture the expanded form image I have to resize it, arrange the components, etc and then call createComponentSnapshot(). But when I do this, you see the form being resized and I can’t find any way to temporarily suspend paints to the screen.



Oops, I see I posted in the wrong forum. I’ll repost this under general questions.