Windows with Delphi Windows API (94) Windows Filesystem (41) Windows Forms (69) Windows Graphics (38)
Exchange Links 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:
 | |  | |
type
TMyForm = class(TForm)
procedure FormCreate(Sender: TObject);
procedure CreateParams(var Params: TCreateParams); override;
end;
procedure TMyForm.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.ExStyle:= Params.ExStyle or WS_EX_TRANSPARENT;
end;
Procedure TMyForm.FormCreate(Sender: TObject);
begin
inherited;
Canvas.Brush.Style := bsClear;
end;
| |  | |  |
Comments:
|