Im folgenden eine transparente Listbox (ungetestet):
Delphi-Quellcode:
type
TTransparentListBox = class(TListBox)
private
procedure WMEraseBkgnd(var Message: TWmEraseBkgnd); message WM_ERASEBKGND;
protected
procedure CreateParams(var Params: TCreateParams); override;
end;
implementation
procedure TTransparentListBox.CreateParams(var Params: TCreateParams);
begin
inherited CreateParams(Params);
Params.ExStyle:= Params.ExStyle or WS_EX_TRANSPARENT;
end;
procedure TTransparentListBox.WMEraseBkgnd(var Message: TWmEraseBkgnd);
begin
// in this case, we want to intercept the windows message. if we would want to
// pass the message to the ancestor classes, we could use the keyword
// "inherited" without the procedure name. example:
// inherited;
Message.Result := 1;
end;
PS: Verschwende deine Zeit nicht mit nutzlosen optischen Gimmicks.