OSK.EXE最小化后,如何使用代码再次显示? [英] OSK.EXE after minimization, how to use code to display again?

查看:331
本文介绍了OSK.EXE最小化后,如何使用代码再次显示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在TextBox的Enter事件中,调用方法InputArea_Enter来显示软键盘。

但如果我最小化软键盘,则无法再次显示。

当软键盘最小化时,TextBox在进入软键盘时如何显示软键盘。

In the Enter event of TextBox, the method InputArea_Enter is called to display the soft keyboard.
But if I minimize the soft keyboard, it can't be displayed again.
When the soft keyboard is minimized, how can TextBox display the soft keyboard when entering the soft keyboard.

private static Process _oskProcess = null;
       public void InputArea_Enter()
       {
             if (_oskProcess != null)
               {
                   Process[] pro = Process.GetProcessesByName("osk");
                   if (pro != null && pro.Length > 0)
                   {
                       return;
                   }
               }
               try
               {
                   _oskProcess = Process.Start("OSK.EXE");
               }
               catch (Exception ex)
               {
                   MessageBox.Show(ex.Message);
               }

       }





我的尝试:



我尝试使用以下方法:



What I have tried:

I tried to use the following methods:

[DllImport ("user32.dll")]
Public static extern int ShowWindow (int hWnd, int nCmdShow);



但它与它无关。


But there's nothing to do with it.

推荐答案

而不是(或除了)Enter事件,您可以使用单击 [ ^ ]事件。
Instead of (or in addition to) the Enter event, you could use the Click[^] event.


这篇关于OSK.EXE最小化后,如何使用代码再次显示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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