本文整理自网络,侵删。
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 选择目录对话框(selectdirectory 函数)
更多相关阅读请进入《Delphi》频道 >>