Board index » delphi » Flickering bitmap in Image component

Flickering bitmap in Image component

I wonder if anyone can help me with this problem. When I draw on a
bitmap which is loaded and stretched to double size in both sirections
the bitmap keeps flickering. Anyone know of a solution?

 

Re:Flickering bitmap in Image component


Quote
Adrian Knowles wrote:

> I wonder if anyone can help me with this problem. When I draw on a
> bitmap which is loaded and stretched to double size in both sirections
> the bitmap keeps flickering. Anyone know of a solution?

I've had similar problems with TPaintBox.  I believe that what you are seeing
is a loop where wm_paint messages are being repeatatively triggered.  Where
are you drawing your bitmap, in the form's OnPaint or in a TImage.OnPaint?  
You might want to try putting the bitmap drawing in the timage.onpaint.  

Also, I noticed that with the TPaintBox that placing the drawing routines in
the tpaintbox.onpaint and setting the alignment of the tpaintbox to 'none',
that the problem disappeared.  

I have still not found a good answer to this class of problems myself, but I
hope this helps.
--------------------------------------
Dave Cappellucci
Acappella Publishing
http://www.usa.net/acappella/
--------------------------------------

Other Threads