随笔分类 - Winform
C# 训练场(四)创建系统热键,并向活动窗口输入信息
摘要:本文转载 http://blog.csdn.net/imbiz/article/details/5648682练习使用API。实现以下功能:1. 设定热键2. 检测当前活动窗口3. 向活动窗口发送信息4. 取消注册热键[c-sharp]view plaincopyusingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Windows.Forms;
C# 神奇的 SendKeys 类
摘要:SendKeys.Send 方法.NET Framework 4其他版本 .NET Framework 4.5.NET Framework 3.5.NET Framework 3.0.NET Framework 2.0向活动应用程序发送击键。命名空间: System.Windows.Forms程序集:System.Windows.Forms(在 System.Windows.Forms.dll 中)语法C#C++F#VB复制public static void Send( string keys)参数keys类型:System.String要发送的击键字符串。异常异常条件InvalidOper
C#实现打开文件或文件夹及选中文件
摘要:打开文件夹:1System.Diagnostics.Process.Start(FilePath);打开文件夹中某个文件:1System.Diagnostics.Process.Start(FilePath+"/"+FileName);打开文件夹并选中单个文件:1System.Diagnostics.Process.Start("Explorer","/select,"+ FilePath+"\\"+FileName);或1System.Diagnostics.Process.Start("Explore