Board index » delphi » Flicker with graphic component - HELP!

Flicker with graphic component - HELP!

Hi;

I have writen a component of TGraphicControl. In Paint I modify a temporary
bitmap and then bitblt the temporary bitmap to the canvas of the control. It
works great but I have an occasional flicker where the control appears to
turn white ever so briefly. Is there a way around this?
Any help greatly appreciated...

Merwin (mupd...@earthlink.net)

 

Re:Flicker with graphic component - HELP!


Quote
Merwin Updyke wrote:

> Hi;

> I have writen a component of TGraphicControl. In Paint I modify a temporary
> bitmap and then bitblt the temporary bitmap to the canvas of the control. It
> works great but I have an occasional flicker where the control appears to
> turn white ever so briefly. Is there a way around this?
> Any help greatly appreciated...

> Merwin (mupd...@earthlink.net)

Hi,

Yes two!

1. Trash the WM_ERASEBKGND message by doing nothing and returning 1.
   This works -- I've tried it.

2. In the Form's OnCreate set:
   Brush.Style := bsClear;
   NOT THE CANVAS brush but the FORMS brush.
   I haven't tried it yet, but I have been told that it works
   and it seems a more elegant solution.

BTW, your problem is (If you haven't guessed by now :-)) the form
eraseing it's background before it paints.

Best Regards,

David S. Lee

Re:Flicker with graphic component - HELP!


Quote
mupd...@earthlink.net (Merwin Updyke) wrote:
>Hi;
>I have writen a component of TGraphicControl. In Paint I modify a temporary
>bitmap and then bitblt the temporary bitmap to the canvas of the control. It
>works great but I have an occasional flicker where the control appears to
>turn white ever so briefly. Is there a way around this?
>Any help greatly appreciated...

Repaint causes the canvas to repaint without clearing first.  Refresh
clears the canvas before repainting.  Refresh will cause the momentary
flicker.
-------------------------------
Thomas Paul
TOMG...@Pipeline.Com
Dean Witter, Discover & Co.
New York City, NY USA
----------------------------------

Other Threads