Uses Windows,Registry;

function GetShellFolders(strDir: string): 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(strDir);
end;
finally
Reg.Free;
end;
result := strFolders;
end; {获取桌面} function GetDeskeptPath: string;
begin
Result := GetShellFolders('Desktop'); //是取得桌面文件夹的路径
end; {获取我的文档} function GetMyDoumentpath: string;
begin
Result := GetShellFolders('Personal'); //我的文档
end;

Delphi 取得桌面文件夹的路径和取得我的文档的路径的更多相关文章

  1. NSBundle、UIImageView和UIButton对比、Xcode文档安装路径、Xcode模拟器安装路径

    1.NSBundle1> 一个NSBundle代表一个文件夹,利用NSBundle能访问对应的文件夹2> 利用mainBundle就可以访问软件资源包中的任何资源3> 模拟器应用程序 ...

  2. 【C#】获取当前系统桌面、我的照片、我的文档等路径

    获取当前系统桌面.我的照片.我的文档等路径   using System; using System.Collections.Generic; using System.ComponentModel; ...

  3. Httpd服务入门知识-Httpd服务常见配置案例之定义'Main' server的文档页面路径(文档根路径)

    Httpd服务入门知识-Httpd服务常见配置案例之定义'Main' server的文档页面路径(文档根路径)  作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.创建测试文件 [ ...

  4. 【转】 修改vs2010帮助文档(MSDN)路径

    VS2010的MSDN采用代理网页的方式,规定首次确定目录后不能更改本地Help Library的路径,只好手动变更路径 第一步: 先把MSDN装好,先装在C盘,默认的路径 第二步 现在我要把MSDN ...

  5. 关于VS2010的帮助文档更改路径

    不小心把MSDN装在系统盘怎么办? 由于自己的C盘空间比较有限,所以经常需要把软件安装在其他磁盘,比如E盘,但是这次重装却不小心就装在C盘了,特遗憾,偶然在网上找到可以更改路径的方法,自己试试,成功了 ...

  6. Qt我的文档 桌面路径

    我的文档 QString location = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); 桌面 QStr ...

  7. 安装的Android SDK下无doc文件夹问题 以及关联Android帮助文档和查看文档 以及查看在线文档

    参考连接:https://blog.csdn.net/fangzicheng/article/details/78344521 https://jingyan.baidu.com/article/29 ...

  8. C#读取“我的文档”等特殊系统路径及环境变量

    返回“我的文档”路径字符串 Environment.GetFolderPath(Environment.SpecialFolder.Personal) 本技巧使用GetFolderPath方法来获取指 ...

  9. Java读取“桌面”、“我的文档”路径的方法

    读取“桌面”的方法: javax.swing.filechooser.FileSystemView fsv = javax.swing.filechooser.FileSystemView.getFi ...

随机推荐

  1. Windows-009-Win7 操作系统安装图文详解

    此文主要讲述 Win7 操作系统的安装,配以详细的图文介绍,希望能对亲有所帮助,若有不足之处,敬请大神指正,不胜感激! 若是亲在虚拟机(VirtualBox)中安装 Win7,其前期虚拟硬件系统的操作 ...

  2. visual studio2013 添加 dll库

    在visual studio2013中添加C#的dll库.记录如下: 在solution explorer处右键,选择reference--> add References 选择Browser. ...

  3. http文件的断点续传和下载

    http://www.tuicool.com/articles/ZbyymqJ Content-Disposition:inline; filename= "c501b_01_h264_sd ...

  4. Foundation of 3D computer Graphics--Reading notes

    2.1 几何数据类型 向量表示两个点之间的移动,点表示位置. 2.2 向量,坐标向量和基 向量$\overrightarrow{v}$ ,坐标向量c,基向量$\overrightarrow{b^{t} ...

  5. Android 百度地图SDK 定位

    引用locSDK_6.1.3.jar,切记添加相应的so文件. 1.定位初始化,需要使用getApplicationContext() mLocClient = new LocationClient( ...

  6. Android --http请求之HttpURLConnection

    参考博客:Android HttpURLConnection 基础使用 参考博客:Android访问网络,使用HttpURLConnection还是HttpClient? String getUrl ...

  7. 第一篇 SQL Server安全概述

    本篇文章是SQL Server安全系列的第一篇,详细内容请参考原文. Relational databases are used in an amazing variety of applicatio ...

  8. web文件上传的实现

    1,html页面,上传使用input type=file控件,其所在的form必须加上enctype="multipart/form-data" <form role=&qu ...

  9. UISlide属性

    1.    minimumValue  :当值可以改变时,滑块可以滑动到最小位置的值,默认为0.0 _slider.minimumValue = 10.0; 2.    maximumValue :当 ...

  10. dstat

    $ dstat You did not select any stats, using -cdngy by default. ----total-cpu-usage---- -dsk/total- - ...