I have just read this question and I really loved this answer to the question. Naturally, an interesting question popped in my head...
How to add my own events (of my own applications) in the Control Panel -> Sounds and Audio Devices -> Sounds -> Program Events?
And another related question, that I suppose should be answered here as well is... How do I play those sounds specified in the Control Panel, when the event in my application occurs?
A bit of quality time with Google led me to a CodeProject article called "Creating Your Own Sound Alerts". It seems the secret sauce is all underneath the HKEY_CURRENT_USER\AppEvents
registry key.
From the article:
Ok, it was very easy to create new Sound Alert Scheme. Now let us move to add our own Sound Alert Type in the sounds. For that follow these steps.
- Create a new Key under HKEY_CURRENT_USER\AppEvents\Schemes\App.Default and name that XYZAlert
- Create another key under the key XYZAlert (the key you have created in above step) and name that .default
- Set the default value of the .default key to path of some .wav file. eg. C:\abc\abc.wav
- Create another key under XYZAlert and name that to .current and also set the path to some wav file, or leave that blank.
- Now Create another key under HKEY_CURRENT_USER\AppEvents\EventLabels and name that XYZAlert
- Set the default value of this key to anything like "XYZ Alert Here."
That's finish. Now go to your control panel and start the sounds applet. You will see the new sound alert type with name XYZ Alert.
Note that you also have to play the sounds using the "PlaySound" native call.
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