检测并移动屏幕键盘上的默认值远离编辑控件。 [英] Detect and move default on screen keyboard away from edit control.

查看:61
本文介绍了检测并移动屏幕键盘上的默认值远离编辑控件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户点击进入编辑控件默认屏幕键盘出现时。但是它与编辑控件重叠。如何移动/弹出屏幕键盘远离编辑控件。有没有一种干净的方法来检测屏幕键盘是否可见,如果
可见,将其移开?用户可以在平板电脑或支持触摸的设备上运行Windows 10/8/7。 

When user click into edit control default on screen keyboard shows up. However its overlapping the edit control. How to move/popup onscreen keyboard away from edit control. Is there a clean way to detect on screen keyboard is visible and move it away if visible?. User could be running windows 10/8/7 on tablet or touch enabled device. 

var asForm = System.Windows.Automation.AutomationElement.FromHandle(this.Handle)

谢谢

推荐答案


当用户点击进入编辑控件默认屏幕键盘出现时。但是它与编辑控件重叠。如何移动/弹出屏幕键盘远离编辑控件。有没有一种干净的方法来检测屏幕键盘是否可见,如果
可见,将其移开?用户可以在平板电脑或支持触摸的设备上运行Windows 10/8/7。 

When user click into edit control default on screen keyboard shows up. However its overlapping the edit control. How to move/popup onscreen keyboard away from edit control. Is there a clean way to detect on screen keyboard is visible and move it away if visible?. User could be running windows 10/8/7 on tablet or touch enabled device. 

var asForm = System.Windows.Automation.AutomationElement.FromHandle(this.Handle)

谢谢

嗨sbprasadrao,

Hi sbprasadrao,

根据你的描述,你编辑控件,键盘在屏幕上显示默认值,但是键盘 重叠编辑控件,因此您希望屏幕键盘远离编辑控件。我对吗?你是否考虑在你的应用程序中使用屏幕
键盘上的窗口,我使用它,它可以移走。

According to your description, you edit control , the keyboard shows up default on screen, but the keyboard  overlap the edit control, so you want to move onscreen keyboard away from edit control. AM i right? Do you consider to use windows on screen keyboard in your application, i use this, and it can move away.

private void textBox1_Click(object sender, EventArgs e)
        {
            try
            {             
               Process.Start(@"C:\Program Files\Common Files\Microsoft Shared\ink\TabTip.exe");
            }
            catch (Exception error)
            {
                string err = error.ToString();
            }
        }




但请注意,你可能需要关闭屏幕键盘上的窗口,然后你可以在下次再次使用它。

But please note that you could need to close the window on screen keyboard, then you can use this again next time.

private void button1_Click(object sender, EventArgs e)
        {
            Process[] oskProcessArray = Process.GetProcessesByName("TabTip");
            foreach (Process onscreenProcess in oskProcessArray)
            {
                onscreenProcess.Kill();
            }
        }

最好的问候,

Cherry

这篇关于检测并移动屏幕键盘上的默认值远离编辑控件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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