本文整理自网络,侵删。
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;
相关阅读 >>
idhttp访问网页出现socket error #10054错误
ttreeview的两个事件ondragdrop、ondragover 实现自动拖放功能
更多相关阅读请进入《Delphi》频道 >>