0
votes

I want to make my form transparent. Then when i make AlphaBlend is true, all of component is transparent. How to make the form is transparent except for the component?

Form in lazarus

1

1 Answers

1
votes

Windows solution:

uses Windows;

...

procedure TForm1.FormCreate(Sender: TObject);
begin
Color:=clRed;
SetWindowLongPtr(Self.Handle, GWL_EXSTYLE,GetWindowLongPtr(Self.Handle, GWL_EXSTYLE) or WS_EX_LAYERED);
SetLayeredWindowAttributes(Self.Handle, clRed, 0, LWA_COLORKEY);
end;

Filling the form in red color and creation him transparent.