Hi is it possible to disable the ding sound which gets played when you click on a form which has its enabled property set to false? If so please help :P
Thanks alot! ;)
Printable View
Hi is it possible to disable the ding sound which gets played when you click on a form which has its enabled property set to false? If so please help :P
Thanks alot! ;)
That is a Windows setting rather than something specific to your program, so even if it is possible you shouldn't do it.
Yes it is possible to do it...
Go to control panel~~> Sounds.
Under the Tab "Sounds"
Under "Program Events"
Select "Default Beep" under "Windows"
In the sounds combobox below, set the sound to "None"
Click on Apply and then click on "Ok" to exit...
Hope this helps...
Edit: Si beat me to it...What Si says, makes sense so if it is only for your pc, then change it else do not do it...
Additionally, the default beep can apply to other windows sound. Disabling it, especially through code, is not recommended as it may make your users disappointed with your app.
Doesnt matter I've sorted it out for myself by changing the reg values of that default beep sound to a null value then when my app closes it gets set back to the original setting of Windows XP Ding.wav.
Thanks anyway guys!
So if you query is solved then do remember to mark this thread Resolved :)
I'm not to sure if that is a good idea changing registry just to disable the default beep. What happens if your app crashes for some reason? If you don't do the right error correcting it will stay the same until your users change it back.
Just something to think of.
Indeed - and that is just one of the reasons that your application making system-wide changes is extremely rude, and should not be considered unless it is the entire point of your program.
Others include:
If you want to make that change manually on your own system then it is fair enough, but to do it automatically on somebody elses computer is out of order - lots of people would uninstall your program as soon as they noticed something like that.
- If the user has limited permissions, there is a chance that it will fail.
- You wrote "when my app closes it gets set back to the original setting of Windows XP Ding.wav.", do you mean you have hard-coded that value? If so, that will fail for many people, and be wrong for many others.
- If it isn't hard coded but there is a problem reading/setting the value to start with, when your program closes will you accidentally set it to the wrong value?
- Even if you do manage to always set it back when finished (which is doubtful), it will affect all other programs while your program is running.
- What happens if the user starts more than one copy of your app? The first will remove the sound, the others will assume that it was meant to be off - and if the first to open isn't the last to close, you have made a permanent change to their system.