BitmapForm.pas
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. unit BitmapForm;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5.   Dialogs, FormOperations, ExtDlgs, ExtCtrls, SaveStatusForms;
  6. type
  7.   TFormBitmap = class(TSaveStatusForm, IFormOperations)
  8.     Image1: TImage;
  9.     OpenPictureDialog1: TOpenPictureDialog;
  10.     SavePictureDialog1: TSavePictureDialog;
  11.   private
  12.     { Private declarations }
  13.   public
  14.     procedure Load;
  15.     procedure Save;
  16.   end;
  17. var
  18.   FormBitmap: TFormBitmap;
  19. implementation
  20. {$R *.DFM}
  21. { TFormBitmap }
  22. procedure TFormBitmap.Load;
  23. begin
  24.   if OpenPictureDialog1.Execute then
  25.     Image1.Picture.LoadFromFile(OpenPictureDialog1.FileName);
  26. end;
  27. procedure TFormBitmap.Save;
  28. begin
  29.   if SavePictureDialog1.Execute then
  30.     Image1.Picture.SaveToFile(SavePictureDialog1.FileName);
  31. end;
  32. end.