home *** CD-ROM | disk | FTP | other *** search
- // VCL component TJwBitMapResource
- // Version History
- // 1.00 May 3, 1999 Initial Release
-
- // Created By:
- // Joseph Wilcock
- // Coockoo@hotmail.com
- // http://msnhomepages.talkcity.com/RedmondAve/coockoo/
- unit JwBmpRes;
-
- interface
-
- uses WinTypes, WinProcs, SysUtils, Classes, Controls, Graphics;
-
- type
- TJwBitMapResource = class(TComponent)
- private
- { Private fields of TJwBitMapResource }
- FMain : TPicture;
- FTagName : String;
- { Private methods of TJwBitMapResource }
- procedure SetMain( Value: TPicture );
- function GetTagName: String;
- procedure SetTagName( Value: String );
- protected
- { Protected fields of TJwBitMapResource }
-
- { Protected methods of TJwBitMapResource }
- procedure Loaded; override;
-
- public
- { Public fields and properties of TJwBitMapResource }
-
- { Public methods of TJwBitMapResource }
- constructor Create(AOwner: TComponent); override;
- destructor Destroy; override;
- function Execute: Boolean;
- published
- { Published properties of TJwBitMapResource }
- property Picture: TPicture read FMain write SetMain;
- property TagName: String read GetTagName write SetTagName;
- end;
-
- procedure Register;
-
- implementation
-
- procedure Register;
- begin
- { Register TJwBitMapResource with JwTools as its
- default page on the Delphi component palette }
- RegisterComponents('JwTools', [TJwBitMapResource]);
- end;
-
- { Write method for property Main }
- procedure TJwBitMapResource.SetMain(Value : TPicture);
- begin
- FMain.Assign(Value);
- end;
-
- { Read method for property TagName }
- function TJwBitMapResource.GetTagName : String;
- begin
- Result := FTagName;
- end;
-
- { Write method for property TagName }
- procedure TJwBitMapResource.SetTagName(Value : String);
- begin
- if FTagName <> Value then
- FTagName := Value;
- end;
-
- constructor TJwBitMapResource.Create(AOwner: TComponent);
- begin
- inherited Create(AOwner);
- FMain := TPicture.Create;
- end;
-
- destructor TJwBitMapResource.Destroy;
- begin
- FMain.Free;
- inherited Destroy;
- end;
-
- function TJwBitMapResource.Execute : Boolean;
- begin
- Result := True
- end;
-
- procedure TJwBitMapResource.Loaded;
- begin
- inherited Loaded;
- end;
-
- end.
-