Question

Hoping some of you out there will be able to point me in the right direction to handle flickering/tearing/redrawing issues when I 'animate' some components in an application.

I have to preface this by saying that the 'animations' seem to work correctly (no flickering etc) when not in full screen mode - i.e. 1024*768, borderstyle=bsSingle. It's when the application takes over the full monitor and the borderstyle becomes bsNone, that this issue becomes more than apparent.

There are 2 'animations':

1 - Panels scrolling left to right using the Winapi AnimateWindow method

2 - TmsAdvPolyPager stepping through each one of its items and subsequently showing its 'page'

When scrolling the panels, the panel that is 'exiting' leaves a 'trail' and the animation seems to shudder, it's no longer smooth.

When stepping through the TmsAdvPolyPager items, the next item will sometimes not become highlighted and the page it shows often has 'residuals' from the previous panel.

Both animations are triggered by a timer - the AnimateWindow is in it's own thread, the PolyPager stepping is not.

So, basically - any thoughts on how to smooth out these animations and force a correct redrawing of the TmsAdvPolyPager component? First time trying this kind of stuff, so not totally sure what to look into it.

As always, help is much appreciated!

No correct solution

OTHER TIPS

TPaintBox is what you need, possibly on a TScroller.

Dump the Panels and draw to rectangles on the TPaintbox canvas.

You have obviously written 99% of this code already so moving to defined rectangles shouldn't be a problem :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top