public static void 打开格式化对话框()
{
Process.Start("rundll32.exe"," shell32.dll,SHFormatDrive");
} public static void 打开控制面板游戏控制器一般()
{
Process.Start("rundll32.exe"," shell32.dll,Control_RunDLL joy.cpl,,0");
} public static void 打开控制面板游戏控制器进阶()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL joy.cpl,,1");
} public static void 打开控制面板键盘属性速度()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL main.cpl @1");
} public static void 打开控制面板键盘属性语言()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL main.cpl @1,,1");
} public static void 打开Windows打印机档案夹()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL main.cpl @2");
} public static void 打开Windows字体档案夹()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL main.cpl @3");
} public static void 打开控制面板输入法属性()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL main.cpl @4");
} public static void 打开添加新调制解调器向导()
{
Process.Start("rundll32.exe"," shell32.dll,Control_RunDLL modem.cpl,,add");
} public static void 打开控制面板多媒体属性音频()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL mmsys.cpl,,0");
} public static void 打开控制面板多媒体属性视频()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL mmsys.cpl,,1");
} public static void 打开控制面板多媒体属性MIDI()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL mmsys.cpl,,2");
} public static void 打开控制面板多媒体属性CD音乐()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL mmsys.cpl,,3");
} public static void 打开控制面板多媒体属性设备()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL mmsys.cpl,,4");
} public static void 打开控制面板声音()
{
Process.Start("rundll32.exe"," shell32.dll,Control_RunDLL mmsys.cpl @1");
} public static void 打开控制面板网络()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL netcpl.cpl");
} public static void 打开控制面板密码()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL password.cpl");
} public static void 打开控制面板电源管理()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL powercfg.cpl");
} public static void 打开控制面板区域设置属性区域设置()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL intl.cpl,,0");
} public static void 打开控制面板区域设置属性数字选项()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL intl.cpl,,1");
} public static void 打开控制面板区域设置属性货币选项()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL intl.cpl,,2");
} public static void 打开控制面板区域设置属性时间选项()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL intl.cpl,,3");
} public static void 打开控制面板区域设置属性日期选项()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL intl.cpl,,4");
} public static void 打开ODBC数据源管理器()
{
Process.Start("rundll32.exe"," shell32.dll,Control_RunDLL odbccp32.cpl");
} public static void 打开控制面板系统属性常规()
{
Process.Start("rundll32.exe"," shell32.dll,Control_RunDLL sysdm.cpl,,0");
} public static void 打开控制面板系统属性设备管理器()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL sysdm.cpl,,1");
} public static void 打开控制面板系统属性硬件配置()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL sysdm.cpl,,2");
} public static void 打开控制面板系统属性性能()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL sysdm.cpl,,3");
} ////自定义执行函数,以便下面调用
//public static void execute(string dosCommand)
//{
// //创建进程对象
// Process dos = new Process();
// ProcessStartInfo p = new ProcessStartInfo();
// p.FileName = "cmd.exe";
// p.Arguments = dosCommand;
// //不使用系统外壳程序启动
// p.UseShellExecute = false;
// //不创建窗口
// //p.CreateNoWindow = true;
// dos.StartInfo =p;
// dos.Start();
//} /*shutdown -s -t 3600 -f
一小时后强行关机 用强行主要怕有些程序卡住 关不了机
-s 关机
-r重启
-f强行
-t 时间
-a 取消关机
-l 注销
-i 显示用户界面 具体是什么试试就知道了*/ public static void 关闭并重启计算机()
{
Process.Start("shutdown.exe", "-r");
} public static void 关闭计算机()
{
Process.Start("shutdown.exe", "-s -f");
}
//重载关闭计算机函数,可以设定倒计时
public static void 关闭计算机(string time)
{
string s = "-s -t " + time;
Process.Start("shutdown.exe", s);
} public static void 注销计算机()
{
Process.Start("shutdown.exe", "-l");
} public static void 撤销关闭计算机()
{
Process.Start("shutdown.exe", "-a");
} public static void 打开桌面主旨面板()
{
Process.Start("rundll32.exe"," shell32.dll,Control_RunDLL themes.cpl");
} public static void 打开网址(string address)
{
Process.Start(address);
} public static void 运行程序(string name)
{
Process .Start (name);
} public static void 显示任务栏()
{
ShowWindow(FindWindow("Shell_TrayWnd",null),SW_SHOW);
} public static void 隐藏任务栏()
{
ShowWindow(FindWindow("Shell_TrayWnd",null),SW_HIDE);
} public static void 发送邮件(string address)
{
string s = "mailto:" + address;
Process.Start(s);
} public static void 发送邮件()
{
Process.Start("mailto:feiyangqingyun@163.com");
} public static string 获取系统文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.System);
return s;
} public static void 打开系统文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.System);
Process.Start(s);
} public static string 获取ProgramFiles目录()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles );
return s;
} public static void 打开ProgramFiles目录()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
Process.Start(s);
} public static string 获取逻辑桌面()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
return s;
} public static void 打开逻辑桌面()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
Process.Start(s);
} public static string 获取启动程序组()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
return s;
} public static void 打开启动程序组()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.Startup);
Process.Start(s);
} public static string 获取Cookies文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.Cookies);
return s;
} public static void 打开Cookies文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.Cookies);
Process.Start(s);
} public static string 获取Internet历史文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.History );
return s;
} public static void 打开Internet历史文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.History );
Process.Start(s);
} public static string 获取我的电脑文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.MyComputer );
return s;
} public static void 打开我的电脑文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.MyComputer );
Process.Start(s);
} public static string 获取MyMusic文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic );
return s;
} public static void 打开MyMusic文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.MyMusic );
Process.Start(s);
} public static string 获取MyPictures文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures );
return s;
} public static void 打开MyPictures文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.MyPictures );
Process.Start(s);
} public static string 获取StartMenu文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu );
return s;
} public static void 打开StartMenu文件夹()
{
string s = Environment.GetFolderPath(Environment.SpecialFolder.StartMenu );
Process.Start(s);
}
}
}

c#调用系统资源大集合-2的更多相关文章

  1. c#调用系统资源大集合-1

    using System; using System.Collections.Generic; using System.Text; using System.Runtime.InteropServi ...

  2. c#调用系统资源大集合-3

    public static void 打开控制面板多媒体属性音频() { Process.Start("rundll32.exe", " shell32.dll,Cont ...

  3. 干货!IT小伙伴们实用的网站及工具大集合!持续更新!

    1.Git 还在担心自己辛辛苦苦写的代码被误删了吗?还在担心自己改错了代码不能挽回吗?还在苦恼于多人开发合作找不到一个好的工具吗?那么用Git就对 了,Git是一个开源的分布式版本控制系统,用以有效. ...

  4. Office在线预览及PDF在线预览的实现方式史上最全大集合

    Office在线预览及PDF在线预览的实现方式大集合 一.服务器先转换为PDF,再转换为SWF,最后通过网页加载Flash预览 微软方:利用Office2007以上版本的一个PDF插件SaveAsPD ...

  5. Android 常用代码大集合 [转]

    [Android]调用字符串资源的几种方法   字符串资源的定义 文件路径:res/values/strings.xml 字符串资源定义示例: <?xml version="1.0&q ...

  6. Python GUI之tkinter窗口视窗教程大集合(看这篇就够了) JAVA日志的前世今生 .NET MVC采用SignalR更新在线用户数 C#多线程编程系列(五)- 使用任务并行库 C#多线程编程系列(三)- 线程同步 C#多线程编程系列(二)- 线程基础 C#多线程编程系列(一)- 简介

    Python GUI之tkinter窗口视窗教程大集合(看这篇就够了) 一.前言 由于本篇文章较长,所以下面给出内容目录方便跳转阅读,当然也可以用博客页面最右侧的文章目录导航栏进行跳转查阅. 一.前言 ...

  7. 100多个很有用的JavaScript函数以及基础写法大集合

    100多个很有用的JavaScript函数以及基础写法大集合 1.document.write("");为 输出语句2.JS中的注释为//3.传统的HTML文档顺序是:docume ...

  8. LINUX下编译安装PHP各种报错大集合

    本文为大家整理汇总了一些linux下编译安装php各种报错大集合 ,感兴趣的同学参考下. nginx1.6.2-mysql5.5.32二进制,php安装报错解决: 123456 [root@clien ...

  9. 【ASP.NET实战教程】ASP.NET实战教程大集合,各种项目实战集合

    [ASP.NET实战教程]ASP.NET实战教程大集合,各种项目实战集合,希望大家可以好好学习教程中,有的比较老了,但是一直很经典!!!!论坛中很多小伙伴说.net没有实战教程学习,所以小编连夜搜集整 ...

随机推荐

  1. 用DIV+CSS切割多背景合并图片 CSS Sprites 技术

    很久之前就在互联网网站和一些js插件中见过这种技术的应用,当时觉得很麻烦,就没有用,也没有去深究. 近段时间一直在做前台的一些东西,涉及到很多div+css的问题.这个东东我又碰到了,所以我花了点时间 ...

  2. D3D depth buffer的预览

    在使用D3D开发游戏的过程中,很多情况下都会用到depth buffer来完成特定的效果,比如DOF,Shadows,SSAO等等.在这些情况下我们就可能需要预览depth buffer来确定它是正确 ...

  3. 还是说Memory Model,gcc的__sync_synchronize真是太坑爹了

    还是说Memory Model,gcc的__sync_synchronize真是太坑爹了! 时间 2012-01-29 03:18:35  IT牛人博客聚合网站 原文  http://www.udpw ...

  4. HTML5 canvas 绘图步骤

    1.先把canvas选出来,不选出来你往哪儿画! var oCan=  document.getElementById('xxx'); 2.声明基于 canvas 的context对象,没他你怎么调用 ...

  5. 刘汝佳 算法竞赛-入门经典 第二部分 算法篇 第五章 1(String)

    第一题:401 - Palindromes UVA : http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8 ...

  6. POJ 3335 Rotating Scoreboard(半平面交求多边形核)

    题目链接 题意 : 给你一个多边形,问你在多边形内部是否存在这样的点,使得这个点能够看到任何在多边形边界上的点. 思路 : 半平面交求多边形内核. 半平面交资料 关于求多边形内核的算法 什么是多边形的 ...

  7. hdu 4722 Good Numbers 数位DP

    数位DP!!! 代码如下: #include<iostream> #include<stdio.h> #include<algorithm> #include< ...

  8. http://www.cnblogs.com/leiOOlei/p/5075402.html

    http://www.cnblogs.com/leiOOlei/p/5075402.html

  9. Unable to open debugger port : java.net.ConnectException “Connection refused”

    http://stackoverflow.com/questions/28283087/unable-to-open-debugger-port-java-net-connectexception-c ...

  10. C语言连接Oracle (转载)

    最近在搞C语言连接Oracle.DB2数据库,现把C连接Oracle的文章总结下: 用C语言连接ORACLE数据库.有两个思路和目的 思路一)本地环境:UBUNTU 7.04,ORACLE 10G目的 ...