Adding your own application events to the Control Panel & # 8594; Sounds

I just read this question and I really loved this answer to the question. Naturally, I had an interesting question ...

How to add my own events (from my own applications) to the Control Panel → Sounds and Audio Devices → Sounds → Program Events?

And there is another question related to this that I must answer ... How can I play these sounds indicated in the control panel when an event occurs in my application?

+7
language-agnostic windows events audio
source share
1 answer

A bit of quality time with Google led me to a CodeProject article titled “ Creating Your Own Sound Alerts ”. The secret sauce seems to be under the key HKEY_CURRENT_USER\AppEvents .

From the article:

Well, it was very simple to create a new sound alert scheme. Now let's move on to adding our own alarm sound to sounds. To do this, follow these steps.

  • Create a new key under HKEY_CURRENT_USER \ AppEvents \ Schemes \ App.Default and enter the name XYZAlert
  • Create another key under the key XYZAlert (the key that you created in the previous step) and name it .default
  • Set the default value for the .default key for the path to some .wav file. eg. C: \ a \ abc.wav
  • Create another key under XYZAlert and point it to .current, and also set the path to some wav file or leave it.
  • Now create another key under HKEY_CURRENT_USER \ AppEvents \ EventLabels and name it XYZAlert
  • Set the default value of this key for something like "XYZ Alert Here."

It will end. Now go to the control panel and launch the sound applet. You will see a new beep called XYZ Alert.

Please note that you also need to play sounds using the PlaySound "native call.

+6
source share

All Articles