I have a form and paint it with a gradient on a Paint event. Also I have frames on that form. I want that frames will be transparent to see the gradient of the form or to paint the frames with the gradient instead if transparency isn’t available.
The form and the frame mustn’t flicker 🙂
Ho to do it? Thanks.
Edited:
As I see, there are flickers for frame’s transparency. So the best solution for me now is to override TFrame1.PaintWindow(DC: HDC) and paint a background of the frame with a gradient.
Here is a trick to get transparency in frames, as described here : how-to-make-delphi-tframe-background-transparent.
Updated :
David suggested adding
WS_EX_COMPOSITEDto the style to avoid flicker when resizing.This should be added to all controls.