![]() |
Re: TPanel transparent ?
.dpr fehlt
Ich möchte nur das Panel transparent machen Kann jemand mir helfen? --------- |
Re: TPanel transparent ?
Hast Du die Komponente installiert?
|
Re: TPanel transparent ?
Ich habe den Code in ein neues Project, dann die visuale Objekte erstellt
Delphi-Quellcode:
Ich bekomme ich die Meldung:
unit TransparentPanel;
interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls; type TForm1 = class(TForm); TTransparentPanel = class(TCustomPanel) TransparentPanel: TPanel; Bevel: TBevel; private procedure WMEraseBkgnd(var Message: TWmEraseBkgnd); message WM_ERASEBKGND; protected { Protected declarations } Procedure Paint; override; Procedure CreateParams(var Params : TCreateParams); override; { Private declarations } public { Public declarations } constructor Create(AComponent: TComponent);override; published { Published declarations } Property BevelInner; Property BevelOuter; Property Align; Property Caption; property OnClick; end; var Form1: TForm1; procedure Register; implementation procedure Register; begin RegisterComponents('Shamora', [TTransparentPanel]); end; constructor TTransparentPanel.Create(AComponent: TComponent); begin inherited; ControlStyle := ControlStyle - [csOpaque]; end; Procedure TTransparentPanel.Paint; var Rect: TRect; TopColor, BottomColor: TColor; const Alignments: array[TAlignment] of Word = (DT_LEFT, DT_RIGHT, DT_CENTER); procedure AdjustColors(Bevel: TPanelBevel); begin TopColor := clBtnHighlight; if Bevel = bvLowered then TopColor := clBtnShadow; BottomColor := clBtnShadow; if Bevel = bvLowered then BottomColor := clBtnHighlight; end; begin Rect := GetClientRect; if BevelOuter < bvNone then begin AdjustColors(BevelOuter); Frame3D(Canvas, Rect, TopColor, BottomColor, BevelWidth); end; Frame3D(Canvas, Rect, Color, Color, BorderWidth); if BevelInner < bvNone then begin AdjustColors(BevelInner); Frame3D(Canvas, Rect, TopColor, BottomColor, BevelWidth); end; end; Procedure TTransparentPanel.CreateParams(var Params : TCreateParams); Begin inherited CreateParams(Params); With Params do begin ExStyle := ExStyle or WS_EX_TRANSPARENT; Style := Style and not WS_CLIPCHILDREN; Style := Style and not WS_CLIPSIBLINGS; end; End; procedure TTransparentPanel.WMEraseBkgnd(var Message: TWmEraseBkgnd); begin Message.Result := -1; end; {$R *.dfm} end. EclassNotFound with Message Class TBevel not found Objekte in meinem Form :
Delphi-Quellcode:
object Form1: TForm1
Left = 221 Top = 115 Width = 615 Height = 587 Caption = 'Form1' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False PixelsPerInch = 96 TextHeight = 13 object Bevel: TBevel Left = 20 Top = 20 Width = 461 Height = 441 end object Panel: TPanel Left = 40 Top = 40 Width = 421 Height = 401 Caption = 'Panel' TabOrder = 0 end end ________ |
Re: TPanel transparent ?
Zitat:
--------- |
Re: TPanel transparent ?
Gewöhn Dir endlich ab, Quelltexte per C&P irgendwo in Deinen Sourcen einzufügen. Wenn Du die Komponente nicht installieren willst, speichere deren Source wenigstens irgendwo im Suchpfad ab und binde sie dynamisch ein. Wie das geht, sollte über die SuFu zu finden sein.
|
Re: TPanel transparent ?
Ist die Componente nicht free !!!
Delphi-Quellcode:
{*****************************************************************************}
{ } { Transparent Panel Componente } { Copyright © 1998 by Mik Tran } { Edit by Matti - D6pe } { } {*****************************************************************************} ----------- |
Re: TPanel transparent ?
Wie kommst Du jetzt darauf?
|
Re: TPanel transparent ?
Zitat:
![]() |
Re: TPanel transparent ?
Und was stört Dich an der o.a. Komponente?
|
Re: TPanel transparent ?
Zitat:
Hier habe ich noch ein Transparentes Panel gefunden, diesmal ist free. ![]() Das Form kann ich aber nicht öffnen! |
Alle Zeitangaben in WEZ +1. Es ist jetzt 15:00 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz