delphi save .dfm to .txt

1473 단어
procedure TForm2.saveDfm;
var
  inStream,outStream:TMemoryStream;
begin
   inStream:=TMemoryStream.Create;
   outStream:=TMemoryStream.Create;
   try
      inStream.WriteComponent(self);
      inStream.Position:=0;
      ObjectBinaryToText(inStream,outStream);
      outStream.Position:=0;
      outStream.SaveToFile('c.txt');
   finally
     FreeAndNil(inStream);
     FreeAndNil(outStream);
   end;
end;

좋은 웹페이지 즐겨찾기