本文整理自网络,侵删。
FText: Text;//只能定义为成员或全局AssignFile( FText, edt1.Text );//打开文件 Rewrite( FText );//只能一行一行的写 Writeln( FText, 'aaa'); Writeln( FText, 'aaa'); Writeln( FText, 'aaa'); Writeln( FText, 'aaa'); Writeln( FText, 'aaa'); CloseFile( FText );//关闭也就是保存 s: string; Reset( FText ); mmo1.Clear; while not Eof(FText) do begin Readln( FText, s ); mmo1.Lines.Add(s); end;
相关阅读 >>
Delphi几个进制相关的代码(hextoint、hextoasc)
Delphi twebbrowser出现 method pastehtml not supported by automation object 解决方法
Delphi serial number of an usb flash drive 获取u盘硬件序列号
Delphi 缓冲文件流-tbufferedfilestream tfilestream 性能测试
更多相关阅读请进入《Delphi》频道 >>