|Windows with Delphi|
Windows API (94)
Windows Filesystem (41)
Windows Forms (69)
Windows Graphics (38)
About this site
Links to us
How do I make transparent forms?
This article has not been rated yet. After reading, feel free to leave comments and rate it.
You need to override the CreateParam function and there add WS_EX_TRANSPARENT
to the Params.ExStyle.
Set the form's canvas' Brush.Style to bsClear, as shown in this example:
TMyForm = class(TForm)
procedure FormCreate(Sender: TObject);
procedure CreateParams(var Params: TCreateParams); override;
procedure TMyForm.CreateParams(var Params: TCreateParams);
Params.ExStyle:= Params.ExStyle or WS_EX_TRANSPARENT;
Procedure TMyForm.FormCreate(Sender: TObject);
Canvas.Brush.Style := bsClear;