home *** CD-ROM | disk | FTP | other *** search
- unit Main;
-
- { Program copyright (c) 1995 by Charles Calvert }
- { Project Name: DFM2TXT }
-
- { Example of how to convert a DFM file to a text file.
- Also see the CONVERT.EXE program in the ..\DELPHI\BIN
- subdirectory. }
-
- interface
-
- uses
- SysUtils, WinTypes, WinProcs,
- Messages, Classes, Graphics,
- Controls, Forms, Dialogs,
- StdCtrls;
-
- type
- TForm1 = class(TForm)
- Button1: TButton;
- procedure Button1Click(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- {$R *.DFM}
-
- procedure TForm1.Button1Click(Sender: TObject);
- var
- InFile, OutFile: TFileStream;
- begin
- InFile := TFileStream.Create('main.dfm', fmOpenRead);
- OutFile := TFileStream.Create('main.txt', fmCreate);
- ObjectResourceToText(InFile, OutFile);
- Infile.Free;
- OutFile.Free;
- end;
-
- end.
-