Something like this is the simple solution. You call your method with the textbox you clicked on etc. and start the process and force focus to the texbox you touched.
private void StartKeyBoardProcess(Textbox tb) {
try {
if (tb != null) {
Process.Start("osk.exe", "/C");
tb.Focus();
}
}
catch (Exception ex) {
Messagebox.Show("Error: StartKeyBoardProcess: "+ex);
}
}
private void TextBox_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
Textbox tb = sender as Textbox;
StartKeyBoardProcess(tb);
}
Something like this :)