Einzelnen Beitrag anzeigen

Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#2

Re: Wie bekomme ich ein TCustomControl transparent?

  Alt 27. Jan 2008, 16:12
Hallo, kannst du das Control nicht mit WS_EX_Transparent transparent machen?

Delphi-Quellcode:
type
  TDeinButtonControl = class(TCustomControl)
    public
        procedure CreateParams(var Params: TCreateParams); override;
        constructor Create(AOwner: TComponent); override;
        destructor Destroy; override;
    end;

//..

procedure TDeinButtonControl.CreateParams(var Params: TCreateParams);
begin
 inherited CreateParams(Params);
 Params.ExStyle := Params.ExStyle+WS_EX_TRANSPARENT;
 // Evtl ControlStyle := ControlStyle-[csOpaque];
end;
Thomas
  Mit Zitat antworten Zitat