通过Sendkeys发送Unicode代码点 [英] Sending unicode code points through Sendkeys

查看:197
本文介绍了通过Sendkeys发送Unicode代码点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...

我在项目中使用Sendkeys.SendWait方法,使用Unicode代码点将字符发送到Windows XP,Windows Vista和Windows 7中的Office应用程序.

在这种方法中,Devnagari字符的unicode代码点运行良好,但Windows XP和Windows 7中正常运行时,英文符号逗号()的unicode代码点(u002C)在Windows Vista和Windows 7中无法正常工作.

它在Vista和7中为逗号的代码点生成InvalidArgumentException(队列为空).
谁能告诉我为什么它只在Windows Vista和Windows 7中对逗号抛出错误?

谢谢.

Hi...

I am using Sendkeys.SendWait method in my project for sending characters, using unicode code points, to the Office Applications in Windows XP, Windows Vista and Windows 7.

In this method, the unicode code point for Devnagari Characters are working nicely but the unicode code point (u002C) of English Symbol Comma ( , ) is not working in Windows Vista and Windows 7 while it is working properly in Windows XP.

It generates an InvalidArgumentException (Queue Empty) for the code point of Comma in Vista and 7.

Could anyone tell me that why it is throwing an error only for Comma in Windows Vista and Windows 7?

Thanks.

推荐答案

确保您正在使用相同类型的键盘配置,或者从控制面板更改键盘配置,然后重试.
Make sure wheather you are using the same type of keyboard configuration or change the keypad configurations from control panel and try again.


尝试使用My.Computer.Keyboard.SendKeys(,",True)代码的语法为My.Computer.Keyboard.SendKeys(keys,wait)
我认为应该可以.
Try Using My.Computer.Keyboard.SendKeys(",", True) The syntax of code is My.Computer.Keyboard.SendKeys(keys ,wait)
I think it should work fine.


这篇关于通过Sendkeys发送Unicode代码点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆