RSS订阅 | 匿名投稿
您的位置:网站首页 > 程序 > 正文

Delphi取得目前程序位置名称路径

作者:admin 来源: 日期:2015/3/12 21:45:57 人气: 标签:

// 假如程式路徑在 c:\projects\bin\project1.exe
ShowMessage('Drive = '+ExtractFileDrive (Application.Exename));  //C:
ShowMessage('Dir   = '+ExtractFileDir   (Application.Exename));  //c:\projects\bin
ShowMessage('Path  = '+ExtractFilePath  (Application.Exename));  //c:\projects\bin\
ShowMessage('Name  = '+ExtractFileName  (Application.Exename));  //project1.exe
ShowMessage('OnlyName ='+ChangeFileExt(ExtractFileName(Application.Exename), ''));  //project1
ShowMessage('Ext   = '+ExtractFileExt   (Application.Exename)); //.exe

读完这篇文章后,您心情如何?
0
0
0
0
0
0
0
0
本文网址:
下一篇:没有资料