I managed to get a keyboard in windows 8 to show when clicking on a NumericUpDown box in a new form that I made pop up. Unfortunately, it seems that after closing the keyboard on "lost focus", the window is distorted and wont show the entire program until that popup window is closed.
//Close keyboard
void CopiedNudPass_LostFocus(object sender, EventArgs e)
{
Version win8version = new Version(6, 2, 9200, 0);
if (Environment.OSVersion.Version >= win8version)
{
Process[] oskProcessArray = Process.GetProcessesByName("TabTip");
foreach (Process onscreenProcess in oskProcessArray)
{
onscreenProcess.Kill();
}
Refresh();
}
}
So, basically, I need to refresh the background window when closing the keyboard from the currently opened form. Any advice is appreciated. Thank you.
I found my solution here:
After killing the process for TabletKeyboard(TabTip.exe) application doesn't bring back to its original size in wpf
Here is my new close code:
I also had to add a reference to WindowsBase and add external functions to the project. The steps and additional code are in the url I linked to in this post. Here's how you add a reference for WindowsBase to get using System.Windows.Interop; to work: