Delphi 获取系统启动文件夹路径


本文整理自网络,侵删。

 
 uses  ShlObj, ShellAPI;

function GetAutoRunFilePath(): String;
var
  fileName, pathStartUp: String;
  path: array [0 .. 255] of Char;
begin
  if SHGetSpecialFolderPath(0, @path[0], CSIDL_STARTUP, true) then
    pathStartUp := String(path);

  Result := pathStartUp + PathDelim + fileName;
end;


procedure TForm1.FormCreate(Sender: TObject);
begin

form1.Caption:=GetAutoRunFilePath;
end;

相关阅读 >>

Delphi写的播放器核心代码,播放mp3无压力

Delphi通过ip或机器名获取局域网mac地址

Delphi 在状态条中显示进度条,webbrowser示例

Delphi 中使用dialog api

Delphi processid, process handle, window handle 之间的互相转换

Delphi 为richedit设置行号

Delphi单元文件基本结构

Delphi+mysql:tadoquery使用插入中文乱码解决方法

Delphi 得到一个cuid用户唯一标识

Delphi屏蔽alt+tab键代码

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



打赏

取消

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

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

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

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

评论

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