Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2014-08

TImage : how to avoid flickering when changing image

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Dennis Poon

every few seconds, I want the same TImage to load a different jpg file but now it flickers whenever
TheImage.Picture.LoadFromFile('new.jpg');

How do I avoid the flickering?

Dennis

Reply by email

Henry Vermaak
to Dennis Poon
Dennis Poon wrote 5 lines
every few seconds, I want the same TImage to load a different jpg file but now it flickers whenever TheImage.Picture.LoadFromFile('new.jpg'); How do I avoid the flickering?

I assume you're on Windows. Have you tried to set DoubleBuffered to True? I didn't use TImage, but I remember having to put the PaintBox onto a panel and set panel.DoubleBuffered to True to stop the flickering.

Henry

Reply by email

Henry Vermaak
to Henry Vermaak
Henry Vermaak wrote 11 lines
On Tue, Aug 05, 2014 at 07:06:43PM +0800, Dennis Poon wrote: > every few seconds, I want the same TImage to load a different jpg > file but now it flickers whenever > TheImage.Picture.LoadFromFile('new.jpg'); > > How do I avoid the flickering? I assume you're on Windows. Have you tried to set DoubleBuffered to True? I didn't use TImage, but I remember having to put the PaintBox onto a panel and set panel.DoubleBuffered to True to stop the flickering.

P.S. This is the wrong list for Lazarus questions.

Reply by email