Hi I have an issue with a .NET touchscreen application in Win7 (no PC keyboard connected). I am using part of the app to act as a terminal window to an external device. When the terminal window opens, I start the on screen keyboard by calling:-
string progFiles = @"C:\Program Files\Common Files\Microsoft Shared\ink";
string onScreenKeyboardPath = System.IO.Path.Combine(progFiles, "TabTip.exe");
oskProcess = System.Diagnostics.Process.Start(onScreenKeyboardPath);
After I have finished with the terminal window, I wish to close the form by a single click on the X of the form, which will then automatically close the on screen keyboard. So I call:-
Process oskProcessArray = Process.GetProcessesByName("TabTip");
foreach (Process onscreenProcess in oskProcessArray)
This works perfectly, EXCEPT when the last key pressed was either a CTRL, ALT or SHIFT key. If this is the case, these remain "stuck" even after the keyboard is killed. If I restart the on screen keyboard, they are still highlighted.
If I click the red X of the keyboard firstly before closing my form, all is good. But I want/need to close both together by a single click from my code. SO, how do I clear any "stuck" keys when exiting the keyboard automatically, or is there a different way to do this?
Instead of killing the process, if I use :-
This will clear the "sticky" CTRL but does not exit the keyboard.