winform textbox 不能唤醒windows 平板的软键盘解决办法

  这个问题,研究了将近两个小时,baidu,google,好大一会,windows 平板本身的应用程序,必须浏览器,notepad都是可以自动唤起软键盘的,但是我的winfrom 程序就是不可以,起先怀疑是我的程序问题,我重新写了一个test  程序,发现依旧是不能唤醒。网上也发现很多网友都有这个问题,但是也没说个什么解决办法。最终,最终,找到一篇帖子,https://stackoverflow.com/questions/36179917/automatically-pop-up-tablet-touch-keyboard-on-winforms-input-focus

         

  1. Insert a reference to UIAutomationClient.dll to your project

  2. In the form-load-handler of the application's main window, insert the following code

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

      

原文地址:https://www.cnblogs.com/techdreaming/p/9810172.html