创建屏幕(虚拟)键盘 [英] Creating Onscreen(virtual) Keyboard

查看:99
本文介绍了创建屏幕(虚拟)键盘的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我是.Net的新手,我正在开发1个应用程序,我想在其中编写屏幕(虚拟)键盘的代码.如果按下按钮,则应该将光标指向任何位置.请帮我提供代码.
任何帮助将不胜感激.

在此先谢谢您.

Hi,
I am new to .Net and I am developing 1 application in which I want to write code for onscreen(virtual) keyboard. If a button is pressed it should write where ever the cursor is pointing. Please help me with the code.
Any help will be kindly appreciated.

Thanks in advance.

推荐答案

这听起来可能很愚蠢,但请多多包涵:

如果您没有触摸屏,那么用户将如何在鼠标光标指向其他位置的情况下按下按钮?

如果您有触摸屏,那么它还没有虚拟键盘吗?为什么要重新发明轮子?
This may sound stupid, but bear with me:

If you do not have a touch screen, then how is the user going to press a button with the mouse cursor pointing somewhere else?

If you do have a touch screen, then doesn''t it already have a virtual keyboard? Why re-invent the wheel?


您可以对活动应用程序使用SendKeys,但是每次单击都会改变焦点,并使键盘成为活动应用程序.这可能对您有帮助
将击键发送到C#中的另一个应用程序 [ http://msdn.microsoft.com/en-us/library/system. windows.forms.sendkeys.aspx [ ^ ]
You can use SendKeys to the active application, but every click changes focus and makes your keyboard the active application. This might be of help to you
Sending Keystrokes to another Application in C#[^]

Note that if your application is intended for international use with a variety of keyboards, the use of Send could yield unpredictable results and should be avoided.
http://msdn.microsoft.com/en-us/library/system.windows.forms.sendkeys.aspx[^]


这篇关于创建屏幕(虚拟)键盘的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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