我想将所写的内容保存,不知道应如何保存?

解决方案 »

  1.   

    yes,如果savedialog不能满足你,自己做一个就是了
      

  2.   

    你是问具体怎样操作吗,查帮助文档吧,下面是一个保存memo中内容的一个示例
    [code=Delphi(Pascal)]
    unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
      Dialogs, StdCtrls;type
      TForm1 = class(TForm)
        Button1: TButton;
        SaveDialog1: TSaveDialog;
        Memo1: TMemo;
        procedure Button1Click(Sender: TObject);
      end;var
      Form1: TForm1;implementation{$R *.dfm}procedure TForm1.Button1Click(Sender: TObject);
    begin
      if SaveDialog1.Execute then
        Memo1.Lines.SaveToFile(SaveDialog1.FileName);
    end;end.[code]
      

  3.   

    if SaveDialog1.Execute then
      Memo1.Lines.SaveToFile(SaveDialog1.FileName);
      

  4.   

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      if SaveDialog1.Execute then
      Memo1.Lines.SaveToFile(SaveDialog1.FileName);
    end;