注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

分享,态度 ·~~

—— 十年太长,五年;如果可以回到五年前,你最想对那时候的自己说什么?

 
 
 

日志

 
 

系统特殊文件夹路径获取  

2009-07-29 15:03:55|  分类: DotNet |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |
public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            richTextBox1.Text = "系统特殊文件夹:";
            richTextBox1.Text += "\n" + "ApplicationData\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
            richTextBox1.Text += "\n" + "CommonApplicationData\t" + Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData);
            richTextBox1.Text += "\n" + "CommonProgramFiles\t" + Environment.GetFolderPath(Environment.SpecialFolder.CommonProgramFiles);
            richTextBox1.Text += "\n" + "Cookies\t\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.Cookies);
            richTextBox1.Text += "\n" + "Desktop\t\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            richTextBox1.Text += "\n" + "DesktopDirectory\t" + Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
            richTextBox1.Text += "\n" + "Favorites\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.Favorites);
            richTextBox1.Text += "\n" + "History\t\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.History);
            richTextBox1.Text += "\n" + "InternetCache\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.InternetCache);
            richTextBox1.Text += "\n" + "LocalApplicationData\t" + Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
            richTextBox1.Text += "\n" + "MyComputer\t" + Environment.GetFolderPath(Environment.SpecialFolder.MyComputer);
            richTextBox1.Text += "\n" + "MyDocuments\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            richTextBox1.Text += "\n" + "MyMusic\t\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.MyMusic);
            richTextBox1.Text += "\n" + "MyPictures\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.MyPictures);
            richTextBox1.Text += "\n" + "Personal\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            richTextBox1.Text += "\n" + "ProgramFiles\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
            richTextBox1.Text += "\n" + "Programs\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.Programs);
            richTextBox1.Text += "\n" + "Recent\t\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.Recent);
            richTextBox1.Text += "\n" + "SendTo\t\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.SendTo);
            richTextBox1.Text += "\n" + "StartMenu\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.StartMenu);
            richTextBox1.Text += "\n" + "Startup\t\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.Startup);
            richTextBox1.Text += "\n" + "System\t\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.System);
            richTextBox1.Text += "\n" + "Templates\t\t" + Environment.GetFolderPath(Environment.SpecialFolder.Templates);
        }
    }
  评论这张
 
阅读(843)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017