让SendKeys支持空格键
来源:互联网 发布:java 抽象类 实例化 编辑:程序博客网 时间:2024/05/10 02:23
Type typeForKeywords = Type.GetType("System.Windows.Forms.SendKeys+KeywordVk[], System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
Type typeForKeywordItem = Type.GetType("System.Windows.Forms.SendKeys+KeywordVk, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
object objNewKey = Activator.CreateInstance(typeForKeywordItem, "SPACE", 0x20);
Type typeForSendKeys = typeof(SendKeys);
FieldInfo fieldForkeywords = typeForSendKeys.GetField("keywords", BindingFlags.NonPublic | BindingFlags.GetField | BindingFlags.Static);
object objKeys = fieldForkeywords.GetValue(null);
Type typeForlistForKeyword = Type.GetType("System.Collections.Generic.List`1[[System.Windows.Forms.SendKeys+KeywordVk, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]], mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
object objForTmpKeyWords = Activator.CreateInstance(typeForlistForKeyword);
MethodInfo mi = typeForlistForKeyword.GetMethod("Add");
foreach (object var in (Array)objKeys)
{
//list.Add(var);
mi.Invoke(objForTmpKeyWords, new object[] { var });
}
//list.Add(key);
mi.Invoke(objForTmpKeyWords, new object[] { objNewKey });
mi = typeForlistForKeyword.GetMethod("ToArray");
object objArray = mi.Invoke(objForTmpKeyWords, null);
fieldForkeywords.SetValue(null, objArray);
- 让SendKeys支持空格键
- VBS的SendKeys 发送空格键
- VBS的SendKeys 发送空格键
- SendKeys
- SendKeys
- SendKeys 类
- SendKeys用法
- SendKeys 方法
- SendKeys 语句
- WScript.SendKeys
- SendKeys函数
- sendKeys(CharSequence[])
- sendKeys & sendRepeatedKeys
- SendKeys 语句
- SendKeys 语句
- SendKeys.SendWait
- sendkeys && appactivate
- 让Mysql支持事务处理
- [JavaScript]类之一---一个简单的javascript类定义例子
- Python入门的36个例子——03 Python 中的数“只有”四种类型
- Python入门的36个例子——04 优雅的字符串
- [JavaScript]类之二---javascript 类定义4种方法
- 本人参与翻译的《Spring高级程序设计》一书已经出版
- 让SendKeys支持空格键
- 经典中的经典,总有一句是你喜欢的
- [JavaScript]类之三---详解javascript类继承机制的原理
- 论函数调用约定
- 《Spring高级程序设计》意见与翻译问题专用贴
- 我的第二个jQuery插件--jQuery.picPreview 0.1--图片预览
- 关于C#数据类型之间转换的问题
- linux5+oracle9.2.0.4
- Js上更换css模板。。就如同博客日志中更换主题模板