home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 December / Chip_2001-12_cd1.bin / zkuste / delphi / kolekce / d345 / JWTOOL.ZIP / jwtool / JwBmpRes.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-09-29  |  2.3 KB  |  97 lines

  1. //   VCL component TJwBitMapResource
  2. //   Version History
  3. //    1.00   May 3, 1999   Initial Release
  4.  
  5. //  Created By:
  6. //    Joseph Wilcock
  7. //    Coockoo@hotmail.com
  8. //    http://msnhomepages.talkcity.com/RedmondAve/coockoo/
  9. unit JwBmpRes;
  10.  
  11. interface
  12.  
  13. uses WinTypes, WinProcs, SysUtils, Classes, Controls, Graphics;
  14.  
  15. type
  16.   TJwBitMapResource = class(TComponent)
  17.     private
  18.       { Private fields of TJwBitMapResource }
  19.       FMain : TPicture;
  20.       FTagName : String;
  21.       { Private methods of TJwBitMapResource }
  22.       procedure SetMain( Value: TPicture );
  23.       function GetTagName: String;
  24.       procedure SetTagName( Value: String );
  25.     protected
  26.       { Protected fields of TJwBitMapResource }
  27.  
  28.       { Protected methods of TJwBitMapResource }
  29.       procedure Loaded; override;
  30.  
  31.     public
  32.       { Public fields and properties of TJwBitMapResource }
  33.  
  34.       { Public methods of TJwBitMapResource }
  35.       constructor Create(AOwner: TComponent); override;
  36.       destructor Destroy; override;
  37.       function Execute: Boolean;
  38.     published
  39.       { Published properties of TJwBitMapResource }
  40.       property Picture: TPicture read FMain write SetMain;
  41.       property TagName: String read GetTagName write SetTagName;
  42.     end;
  43.  
  44. procedure Register;
  45.  
  46. implementation
  47.  
  48. procedure Register;
  49. begin
  50.      { Register TJwBitMapResource with JwTools as its
  51.        default page on the Delphi component palette }
  52.   RegisterComponents('JwTools', [TJwBitMapResource]);
  53. end;
  54.  
  55. { Write method for property Main }
  56. procedure TJwBitMapResource.SetMain(Value : TPicture);
  57. begin
  58.   FMain.Assign(Value);
  59. end;
  60.  
  61. { Read method for property TagName }
  62. function TJwBitMapResource.GetTagName : String;
  63. begin
  64.   Result := FTagName;
  65. end;
  66.  
  67. { Write method for property TagName }
  68. procedure TJwBitMapResource.SetTagName(Value : String);
  69. begin
  70.   if FTagName <> Value then
  71.     FTagName := Value;
  72. end;
  73.  
  74. constructor TJwBitMapResource.Create(AOwner: TComponent);
  75. begin
  76.   inherited Create(AOwner);
  77.   FMain := TPicture.Create;
  78. end;
  79.  
  80. destructor TJwBitMapResource.Destroy;
  81. begin
  82.   FMain.Free;
  83.   inherited Destroy;
  84. end;
  85.  
  86. function TJwBitMapResource.Execute : Boolean;
  87. begin
  88.   Result := True
  89. end;
  90.  
  91. procedure TJwBitMapResource.Loaded;
  92. begin
  93.   inherited Loaded;
  94. end;
  95.  
  96. end.
  97.