添加控制面板在我自己的应用程序事件 - >声音 [英] Adding my own application events in Control Panel -> Sounds
问题描述
我刚才所读<一个href=\"http://stackoverflow.com/questions/80564/visual-studio-how-to-trigger-an-alarm-when-a-breakpoint-is-hit\">this问题和我真的很喜欢<一个href=\"http://stackoverflow.com/questions/80564/visual-studio-how-to-trigger-an-alarm-when-a-breakpoint-is-hit#80587\">this回答的问题。当然,一个有趣的问题在我脑海中突然出现......
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?
推荐答案
的质量时间与谷歌有一点使我称为QUOT一个$ C $的CProject文章;的Creating~~V自己的音色快讯&QUOT ;.看来秘诀是骨子里的 HKEY_CURRENT_USER \\ AppEvents
注册表项。
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.
从文章:
好吧,这是非常容易地创建新的声音警报计划。现在让我们转移到添加我们自己的声音警报类型的声音。对于按照这些步骤。
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.
- 创建HKEY_CURRENT_USER下一个新的密钥\\ AppEvents \\计划\\ App.Default和名称XYZAlert
- 创建下的关键XYZAlert另一个关键(已在上述步骤中创建的键)和名称.DEFAULT
- 将.DEFAULT关键部分.wav文件的路径的默认值。例如。 C:\\ ABC \\ abc.wav
- 创建XYZAlert下的另一个关键和名称来.current并设置路径一些wav文件,或留下空白。
- 现在,创建HKEY_CURRENT_USER下的另一个关键\\ AppEvents \\ EventLabels和名称XYZAlert
- 设置此键,像什么的默认值XYZ警报这里。
这就是终点。现在去你的控制面板和启动声音小程序。你会看到一个名为XYZ警报新的声音警报类型。
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.
请注意,您也可发挥使用&QUOT的声音; PlaySound 一>&QUOT;本地电话。
Note that you also have to play the sounds using the "PlaySound" native call.
这篇关于添加控制面板在我自己的应用程序事件 - &GT;声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!