Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How to disable Windows Touch Keyboard popup in any application

$
0
0

Hello Everyone,

I am creating an desktop application in WPF where I am using custom keyboard for the application but windows default keyboard is getting pop up while text box got focus.

Here i have tried the approach to kill and dispose the "TabTip" process. but while stopping the process if user shutdown the app and use any other application like Google chrome then in such case the windows keyboard is not coming up and we have to manually start it. Also i tried to start the process while my app goes to background but in such case windows keyboard will come up even if there is no text box focused on any other app.

 

Code of above approach : 

foreach (var process in Process.GetProcessesByName("TabTip"))
                {
                    process.Kill();
                    process.WaitForExit();
                    process.Dispose();
                }

------------------------------------------------------------------------

Secondly, i tried to start and stop the service "TabletInputService" while my app is in background and foreground but in this there exception coming up says "Cannot open TabletInputService on your computer " after this i tried to run my application with "run as administrator " and after this the exception i got is " Cannot stop TabletInputService on your computer"

Code of above second approach 

 ServiceController sc = new ServiceController();
            sc.ServiceName = ServiceName;


            if (sc.Status == ServiceControllerStatus.Running)
            {
                try
                {
                    TimeSpan timeout = TimeSpan.FromMilliseconds(5);
                    sc.Stop();
                    sc.WaitForStatus(ServiceControllerStatus.Stopped);

                }
                catch (InvalidOperationException e)
                {

                }

----------------------------------------------

This is all i have tried.

Please suggest what else i can do for this.


Viewing all articles
Browse latest Browse all 18858

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>