c#调用系统资源大集合-1
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.IO; namespace DOS工具箱
{
public class 调用系统资源
{
//引入API函数
[DllImportAttribute("user32.dll")]
public static extern int FindWindow(string ClassName,string WindowName);
[DllImport("user32.dll")]
public static extern int ShowWindow(int handle, int cmdShow);
[DllImport("winmm.dll", EntryPoint = "mciSendString", CharSet = CharSet.Auto)]
public static extern int mciSendString(string lpstrCommand, string lpstrReturnstring, int uReturnLength, int hwndCallback); private const int SW_HIDE=;//API参数表示隐藏窗口
private const int SW_SHOW=;//API参数表示用当前的大小和位置显示窗口 public static void 弹出光驱()
{
mciSendString("set CDAudio door open", null, , );
} public static void 关闭光驱()
{
mciSendString("set CDAudio door closed", null, , );
} public static void 打开C盘()
{
Process.Start("c:\\");
} public static void 打开D盘()
{
Process.Start("d:\\");
} public static void 打开E盘()
{
Process.Start("e:\\");
} public static void 打开F盘()
{
Process.Start("f:\\");
} public static void 打开指定盘(string hardpath)
{
Process.Start(hardpath);
} public static void 打开Word()
{
Process.Start(@"C:\Program Files\Microsoft Office\OFFICE11\winword.exe");
} public static void 打开Excel()
{
Process.Start(@"C:\Program Files\Microsoft Office\OFFICE11\excel.exe");
} public static void 打开Access()
{
Process.Start(@"C:\Program Files\Microsoft Office\OFFICE11\msaccess.exe");
} public static void 打开PowerPoint()
{
Process.Start(@"C:\Program Files\Microsoft Office\OFFICE11\powerpnt.exe");
} public static void 打开OutLook()
{
Process.Start(@"C:\Program Files\Microsoft Office\OFFICE11\outlook.exe");
} public static void 打开记事本()
{
Process.Start("notepad.exe");
} public static void 打开计算器()
{
Process.Start("calc.exe");
} public static void 打开DOS命令窗口()
{
Process.Start("cmd.exe");
} public static void 打开注册表()
{
Process.Start("regedit.exe");
} public static void 打开画图板()
{
Process.Start("mspaint.exe");
} public static void 打开写字板()
{
Process.Start("write.exe");
} public static void 打开播放器()
{
Process.Start("mplayer2.exe");
} public static void 打开资源管理器()
{
Process.Start("explorer.exe");
} public static void 打开任务管理器()
{
Process.Start("taskmgr.exe");
} public static void 打开事件查看器()
{
Process.Start("eventvwr.exe");
} public static void 打开系统信息()
{
Process.Start("winmsd.exe");
} public static void 打开备份还原()
{
Process.Start("ntbackup.exe");
} public static void 打开Windows版本()
{
Process.Start("winver.exe");
} public static void 打开控制面板()
{
Process.Start("rundll32.exe", "shell32.dll,Control_RunDLL");
} public static void 打开控制面板辅助选项键盘()
{
Process.Start("rundll32.exe", "shell32.dll,Control_RunDLL access.cpl,,1");
} public static void 打开控制面板辅助选项声音()
{
Process.Start("rundll32.exe", "shell32.dll,Control_RunDLL access.cpl,,2");
} public static void 打开控制面板辅助选项显示()
{
Process.Start("rundll32.exe", "shell32.dll,Control_RunDLL access.cpl,,3");
} public static void 打开控制面板辅助选项鼠标()
{
Process.Start("rundll32.exe", "shell32.dll,Control_RunDLL access.cpl,,4");
} public static void 打开控制面板辅助选项常规()
{
Process.Start("rundll32.exe", "shell32.dll,Control_RunDLL access.cpl,,5");
} public static void 打开控制面板添加新硬件向导()
{
Process.Start("rundll32.exe", "shell32.dll,Control_RunDLL sysdm.cpl @1");
} public static void 打开控制面板添加新打印机向导()
{
Process.Start("rundll32.exe", "shell32.dll,SHHelpShortcuts_RunDLL AddPrinter");
} public static void 打开控制面板添加删除程序安装卸载面板()
{
Process.Start("rundll32.exe", "shell32.dll,shell32.dll,Control_RunDLL appwiz.cpl,,1");
} public static void 打开控制面板添加删除程序安装Windows面板()
{
Process.Start("rundll32.exe", "shell32.dll,shell32.dll,Control_RunDLL appwiz.cpl,,2");
} public static void 打开控制面板添加删除程序启动盘面板()
{
Process.Start("rundll32.exe", "shell32.dll,shell32.dll,Control_RunDLL appwiz.cpl,,3");
} public static void 打开建立快捷方式对话框()
{
Process.Start("rundll32.exe"," appwiz.cpl,NewLinkHere %1");
} public static void 打开日期时间选项()
{
Process.Start("rundll32.exe"," shell32.dll,Control_RunDLL timedate.cpl,,0");
} public static void 打开时区选项()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL timedate.cpl,,1");
} public static void 建立公文包()
{
Process.Start("rundll32.exe"," syncui.dll,Briefcase_Create");
} public static void 打开复制软碟窗口()
{
Process.Start("rundll32.exe"," diskcopy.dll,DiskCopyRunDll");
} public static void 打开新建拨号连接()
{
Process.Start("rundll32.exe"," rnaui.dll,RnaWizard");
} public static void 打开显示属性背景()
{
Process.Start("rundll32.exe"," shell32.dll,Control_RunDLL desk.cpl,,0");
} public static void 打开显示属性屏幕保护()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL desk.cpl,,1");
} public static void 打开显示属性外观()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL desk.cpl,,2");
} public static void 打开显示属性属性()
{
Process.Start("rundll32.exe", " shell32.dll,Control_RunDLL desk.cpl,,3");
}
c#调用系统资源大集合-1的更多相关文章
- c#调用系统资源大集合-3
public static void 打开控制面板多媒体属性音频() { Process.Start("rundll32.exe", " shell32.dll,Cont ...
- c#调用系统资源大集合-2
public static void 打开格式化对话框() { Process.Start("rundll32.exe"," shell32.dll,SHFormatDr ...
- 干货!IT小伙伴们实用的网站及工具大集合!持续更新!
1.Git 还在担心自己辛辛苦苦写的代码被误删了吗?还在担心自己改错了代码不能挽回吗?还在苦恼于多人开发合作找不到一个好的工具吗?那么用Git就对 了,Git是一个开源的分布式版本控制系统,用以有效. ...
- Office在线预览及PDF在线预览的实现方式史上最全大集合
Office在线预览及PDF在线预览的实现方式大集合 一.服务器先转换为PDF,再转换为SWF,最后通过网页加载Flash预览 微软方:利用Office2007以上版本的一个PDF插件SaveAsPD ...
- Android 常用代码大集合 [转]
[Android]调用字符串资源的几种方法 字符串资源的定义 文件路径:res/values/strings.xml 字符串资源定义示例: <?xml version="1.0&q ...
- Python GUI之tkinter窗口视窗教程大集合(看这篇就够了) JAVA日志的前世今生 .NET MVC采用SignalR更新在线用户数 C#多线程编程系列(五)- 使用任务并行库 C#多线程编程系列(三)- 线程同步 C#多线程编程系列(二)- 线程基础 C#多线程编程系列(一)- 简介
Python GUI之tkinter窗口视窗教程大集合(看这篇就够了) 一.前言 由于本篇文章较长,所以下面给出内容目录方便跳转阅读,当然也可以用博客页面最右侧的文章目录导航栏进行跳转查阅. 一.前言 ...
- 100多个很有用的JavaScript函数以及基础写法大集合
100多个很有用的JavaScript函数以及基础写法大集合 1.document.write("");为 输出语句2.JS中的注释为//3.传统的HTML文档顺序是:docume ...
- LINUX下编译安装PHP各种报错大集合
本文为大家整理汇总了一些linux下编译安装php各种报错大集合 ,感兴趣的同学参考下. nginx1.6.2-mysql5.5.32二进制,php安装报错解决: 123456 [root@clien ...
- 【ASP.NET实战教程】ASP.NET实战教程大集合,各种项目实战集合
[ASP.NET实战教程]ASP.NET实战教程大集合,各种项目实战集合,希望大家可以好好学习教程中,有的比较老了,但是一直很经典!!!!论坛中很多小伙伴说.net没有实战教程学习,所以小编连夜搜集整 ...
随机推荐
- WinHex分析PE格式(1)
最近在一直努力学习破解,但是发现我的基础太差了,就想学习一下PE结构.可是PE结构里的结构关系太复杂,看这老罗的WiN32汇编最后一章 翻两页又合上了..把自己的信心都搞没了.感觉自己的理解能力不行, ...
- C#&java重学笔记(函数)
C#部分 1.写在函数定义的()中的关键字: a.params关键字:用来满足函数的参数为数组时,而数组的长度不固定的情况.且该关键字只能用来修饰数组型参数.这样一修饰,就达成了类似JavaScri ...
- Jquery 中map和each的区别
<script type="text/javascript"> $(function () { var json = {"Name":"L ...
- [转载]U3d常规性能优化技巧
以下技巧并不是必须的,但是对于想要提升游戏性能的人来说应该还是很不错的. 优化的常规技巧 n 剖析你的游戏. 不要花费时间来优化那些晦涩的代码或者缩减图形文件的大小,除非这是你游戏的瓶颈.第一次剖析你 ...
- odata
http://www.odata.org/ Open Data Protocol (开放数据协议,OData)是用来查询和更新数据的一种Web协议,其提供了把存在于应用程序中的数据暴露出来的方式.OD ...
- 数组使用find查询用法
#include "stdafx.h"#include <string>#include <list>#include <algorithm># ...
- SSDP 简单服务发现协议
http://blog.csdn.net/lilypp/article/details/6631951
- Linux inotify功能及实现原理
http://www.cnblogs.com/jiejnan/archive/2012/05/18/2507476.html 简介: 当需要对 Linux®文件系统进行高效率.细粒度.异步地监控时,可 ...
- React组件生命周期-正确执行初始化阶段的函数
一. 二.代码 <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset=&quo ...
- android-exploitme(一):生成apk
exploitme是一个国外的android安全测试环境,http://securitycompass.github.io/AndroidLabs/index.html,通过它可以学习一些基本的测试方 ...