-1

I need to open On-Screen Keyboard everytime when user click in control, that allows to input any text in it. Is any ideas about how to do that?

Ivan Kozlov
  • 255
  • 3
  • 13
  • Show us what you have tried so far. then we will be able to correct your mistake. :) – shrot Mar 23 '18 at 09:54
  • @shrot, it's difficult to make a mistake when you even don't know how to start. So now I need in advice about where should I look for. – Ivan Kozlov Mar 23 '18 at 11:15
  • what kind of application are you working on ? You need to provide some additional info like its web based application on winform application ? Anyway start reading about event. Then you will be able to trigger an action based on event. – shrot Mar 23 '18 at 11:24
  • @shrot, I work at WPF app. I got many text fields such as textboxes and grid text fields. And now I need this app to work with touchScreen devices. So I can add MouseDown or smth like that events handlers for each text field, but I trying to find universal way to do this. And I hope that there is an WinAPI or maybe WPF Window events raising when user click (touch) text field. But I cant find it by myself so asced there. – Ivan Kozlov Mar 23 '18 at 12:06

1 Answers1

2

So assuming when input is needed, the user clicks on a button to launch the on screen keyboard... Then the code would be,

    string progFiles = @"C:\Program Files\Common Files\Microsoft Shared\ink";
    string onScreenKeyboardPath = System.IO.Path.Combine(progFiles, "TabTip.exe");
    onScreenKeyboardProc = System.Diagnostics.Process.Start(onScreenKeyboardPath);

You need to add

using System.Diagnostics;

Hope this helps :P

SunAwtCanvas
  • 1,261
  • 1
  • 13
  • 38
  • Thanks for helping but problem is not in opening a keyboard, it's in understanding when to do this. There is no button, only textboxes and grid fields. – Ivan Kozlov Mar 23 '18 at 11:11
  • @Denise Here OP asked how to trigger a event when focus is set to text box. – shrot Mar 23 '18 at 11:30