Click here to Skip to main content
15,867,686 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How can I restore minimized On-Screen-Keyboard from taskbar in windows 7 using c#?
Posted
Updated 13-Oct-21 8:58am
v2
Comments
Malli_S 23-Jul-14 9:05am    
A very simple solution is to re-launch the keyboard. Or get the keyboard handle and call ShowWindow(). You can try any of these and update the question if stuck somewhere.
joshrduncan2012 23-Jul-14 9:05am    
Are the search engines broken?
Sergey Alexandrovich Kryukov 23-Jul-14 10:21am    
If the keyboard is yours, you should know your source code better, at least good enough to explain where is your problem.

If it is not yours, ask the developers/owners of this code; if there is no a way, the keyboard would be not good enough and would not worth using it. :-)

—SA
Nikhil Paulson 24-Jul-14 1:26am    
Hi,
Its an Windows 7 OSK keyboard.
Sergey Alexandrovich Kryukov 24-Jul-14 12:45pm    
Got it.
—SA

You cannot show / hide the virtual keyboard from .Net managed code. However, as the virtual keyboard is just a standard windows application you can simply show / hide it by starting the appropriate Process.

C#
var virtualKeyboard = new System.Diagnostics.Process();
virtualKeyboard = System.Diagnostics.Process.Start("osk.exe"); // open
virtualKeyboard.Kill(); 


I hope you understand the Limitaions... :)
 
Share this answer
 
Just used this. Expanded into toggle.
C#
namespace Bsc
{
    public static class OnScreenKeyboard
    {
        private static System.Diagnostics.Process virtualKeyboard = new System.Diagnostics.Process();
        public static void ToggleHideShow()
        {
            try
            {
                if (virtualKeyboard.HasExited)
                    virtualKeyboard = System.Diagnostics.Process.Start("osk.exe"); // open
                else
                    virtualKeyboard.Kill();
            }
            catch
            {
                virtualKeyboard = System.Diagnostics.Process.Start("osk.exe"); // open
            }
        }
    }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900