本文整理自网络,侵删。
uses Registry;
///////////////////////////////////
function TForm1.GetDeskPath(): string;const regPath = '\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders';var Reg: TRegistry; strFolders: string;begin Reg := TRegistry.Create; try Reg.RootKey := HKEY_CURRENT_USER; if Reg.OpenKey(regPath, false) then begin strFolders := Reg.ReadString('Desktop'); end; finally Reg.Free; end; result := strFolders;end;
转载于:https://my.oschina.net/jingshishengxu/blog/684575
相关阅读 >>
Delphi xe5 android 调用 google zxing
更多相关阅读请进入《Delphi》频道 >>