MemoForm.pas
资源名称:delphi.rar [点击查看]
上传用户:fh681027
上传日期:2022-07-23
资源大小:1959k
文件大小:1k
源码类别:
Delphi控件源码
开发平台:
Delphi
- unit MemoForm;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, FormOperations, StdCtrls, SaveStatusForms;
- type
- TFormMemo = class(TSaveStatusForm, IFormOperations)
- Memo1: TMemo;
- OpenDialog1: TOpenDialog;
- SaveDialog1: TSaveDialog;
- private
- { Private declarations }
- public
- procedure Load;
- procedure Save;
- end;
- var
- FormMemo: TFormMemo;
- implementation
- {$R *.DFM}
- { TForm2 }
- procedure TFormMemo.Load;
- begin
- if OpenDialog1.Execute then
- Memo1.Lines.LoadFromFile(OpenDialog1.FileName);
- end;
- procedure TFormMemo.Save;
- begin
- if SaveDialog1.Execute then
- Memo1.Lines.SaveToFile(SaveDialog1.FileName);
- end;
- end.