文本框焦点上的自动屏幕键盘(面向触摸的应用程序) [英] Automatic on screen keyboard on textbox focus (touch oriented application)

查看:71
本文介绍了文本框焦点上的自动屏幕键盘(面向触摸的应用程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

am开发一个我想通过鼠标和键盘或触摸屏使用的应用程序.我是这种开发的新手,因此对这种应用程序中的数据插入有一些疑问.

我当时考虑的想法是使用屏幕键盘进行文本插入.我已经在许多设备(如移动电话)中看到,每次将焦点放在文本插入控件(例如文本框)上时,屏幕上的键盘都会自动出现.我想知道是否必须在应用程序本身中对此行为进行编程,还是由操作系统或其他任何人自动完成.这让我感到担心,因为也许只有在用手指指定了文本框的焦点时才会发生这种情况,因为这可能会干扰鼠标和键盘用户.我还能区分这两个事件吗?

我在想的另一件事是,如果我购买了触摸屏并将其连接到CPU,当文本框处于焦点状态时,屏幕键盘会自动出现吗?还是我必须通过编程方式进行操作?

顺便说一下,我必须使用Framework 2.0.不幸的是,这是强制性要求.

如果有人可以帮助我解决这个问题,我将不胜感激.提前非常感谢.

问候.

am developing an application that I want to be used by means of a mouse and keyboard or using a touch screen. I am new to this kind of developments and so I have some doubts about data insertion in this kind of applications.

The idea I was thinking about is having an on-screen keyboard for text insertions. I have seen in many devices, as mobile phones, that every time you give focus to a text insertion control such as a textbox, the on-screen keyboard appears automatically. I wanted to know if this behavior must be programmed in the application itself or is automatically done by the operating system or whoever. This worries me, because maybe this should only happen when the focus to the textbox had been given with the fingers, because it could disturb mouse and keyboard users. Can I also distingish this two events?

Another thing I was thinking on is, if I buy a touch screen and connect it to my CPU, will the on-screen keyboard appear automatically when a textbox is focused or will I have to do it programatically?

I have to use Framework 2.0, by the way. And that is a mandatory requirement, unfortunately.

If someone could help me with this issues, I would highly appreciate it. Many thanks in advance.

Regards.

推荐答案

我在这里解释与虚拟键盘有关的焦点问题及其解决方案:
应用程序焦点的获取和丢失 [
I explain the problem of the focus related to the virtual keyboards and the solution here:
Application focus getting and losing[^].

—SA


您应该能够使用键盘创建表单.您还可以将键盘放在窗体上,仅在需要时显示它,但是您必须将窗体的其余部分放在某种视口控件中.如果您使用表单,我相信您可以通过设置适当的属性将表单保留在最前面.当文本框获得焦点时,将触发焦点事件,它会弹出键盘窗体.键盘表单将需要引用要编辑的控件.然后只需按下按钮即可与控件一起工作.箭头键必须由selStart处理.
You should be able to create a form with the keyboard. You can also have the keyboard on the form, and only show it when you need to, but you will have to put the rest of the form in some sort of viewport control. If you use a form, I believe that you can keep that form on top by setting an appropriate property. When a textbox gets focus, which will trigger a focus event, can pop up the keyboard form. The keyboard form will need to have a reference to the control being edited. Then just have the button presses work with the control. Arrow keys will have to be handled by selStart.


这篇关于文本框焦点上的自动屏幕键盘(面向触摸的应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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