Hvad skal jeg skrive før koden under 'Procedure size;' virker? Jeg har
prøvet 'FImage.Picture.Bitmap.Height, og Width'.
________________________________________________________________________
_____________________________
unit Komponent;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls,
JPEG,
Dialogs, StdCtrls, Forms, extctrls;
type
TEffect = class(TComponent)
private
{ Private declarations }
FImage: TImage;
Procedure size;
protected
{ Protected declarations }
public
{ Public declarations }
Constructor Create(AOwner: TComponent); override;
Destructor Destroy; override;
published
{ Published declarations }
Property Image: TImage read FImage write FImage;
end;
procedure Register;
implementation
procedure Register;
begin
RegisterComponents('PDJ', [TKomponent]);
end;
constructor TKomponent.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
end;
destructor TKomponent.Destroy;
begin
inherited Destroy;
end;
procedure Size;
begin
TKomponent.Image.Picture.Bitmap.Height := 100;
TKomponent.Image.Picture.Bitmap.Width := 100;
end;
end.
--
Leveret af:
http://www.kandu.dk/
"Vejen til en hurtig løsning"