Delphi SaveTextFileDialog 用法


本文整理自网络,侵删。

 
var D: TSaveTextFileDialog;
begin
    D := TSaveTextFileDialog.Create(nil);
    try
      D.Title := 'Exportar to File';
      D.DefaultExt := 'txt';
      D.Filter := 'Text File|*.txt|All Files|*';

      if D.Execute then
        M.Lines.SaveToFile(D.FileName, D.Encodings.Objects[D.EncodingIndex] as TEncoding);

    finally
      D.Free;
    end;

相关阅读 >>

Delphi调试服务程序的两种方法

Delphi webbrowser1实现滚屏

Delphi 简单字符串截取函数

Delphi 利用驱动最简单结束进程的方法

Delphi 瞬间消除无用托盘图标(刷新托盘)

Delphi xe 可用的md5算法

Delphi twebbrowser 响应回车键(ewb响应正常,无需额外代码)

Delphi timage保存图片到stream及从stream中取图片

Delphi xe7中使用json

Delphi sysutils.strcat

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...