Delphi-Quellcode:
unit TranspImage;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
ExtCtrls;
type
TTranspImage =
class(TImage)
private
FTransparenz: Boolean;
procedure SetTransparenz(
const Value: Boolean);
{ Private-Deklarationen}
protected
{ Protected-Deklarationen}
public
property Transparenz : Boolean
read FTransparenz
write SetTransparenz;
{ Public-Deklarationen}
published
{ Published-Deklarationen }
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('
MY', [TTranspImage]);
end;
{ TTranspImage }
{ TTranspImage }
procedure TTranspImage.SetTransparenz(
const Value: Boolean);
begin
FTransparenz := Value;
Picture.Bitmap.Transparent := FTransparenz;
end;
end.
Gruss Mirilin versuchs mal so, bei mir hat es geklappt.
'Datei'->'Neu'->'Komponente'->'VorfahrTyp : TImage'...