I have a C# application running on windows xp/7 where I'm using onscreen keyboard.
When the sound is enabled there is a delay which causes problems. I would like to disable the sound.
How can I disable the sound through my C# application code. Any ideas ?
You can disable it from registry
[HKEY_CURRENT_USER\Software\Microsoft\Osk]
"ClickSound"=dword:00000001 // Related Registry Key
You can use this code to change it
RegistryKey key = Registry.CurrentUser; //key gets the value = "HKEY_CURRENT_USER"
RegistryKey oskKey = key.CreateSubKey(@"Software\Microsoft\Osk");// This line opens the "HKEY_CURRENT_USER\Software\Microsoft\Osk"
oskKey.SetValue("ClickSound", 0); // Set the value of ClickSound to 0(disable) which is 1(enabled) by default.
I haven't tested it yet but you may have to restart osk.exe after this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With