20

I am creating a windows application using C#, where in a button on the GUI when clicked, should display the on-screen keyboard.

Would appreciate if any help is granted. thanks.

Also, since I am mostly using Emgu Cv library for the rest of my app, Can we simply use it for calling the On-screen keyboard?

2
  • 7
    Process.Start("osk.exe"); should work on all Windows systems.
    – Cody Gray
    Jan 10, 2012 at 8:20
  • @CodyGray unfortunately not working when building for x86 (I am forced due to GeckoFx)
    – oo_dev
    May 26, 2020 at 7:07

2 Answers 2

32

In C#, you can simply write the following line of code to invoke the on-screen keyboard application that comes with Windows:

System.Diagnostics.Process.Start("osk.exe");

You can find more help here.

2
  • I just tried it in win10 (creators update) and it works
    – Lyra
    May 31, 2017 at 14:29
  • 3
    On Windows 10 you need to change Build settings to perform target in x64 like @Hassan Rahman said Jun 28, 2018 at 7:23
13

For Windows 10 x64, You have set the project build to x64 as shown in image.

enter image description here

Process process = Process.Start(new ProcessStartInfo(
            ((Environment.GetFolderPath(Environment.SpecialFolder.System) + @"\osk.exe"))));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.