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);
    

      

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM