views:

186

answers:

1

I am learning C# and WPF and had an idea for a little utility. I want a big red button that will do only one thing: completely mute/un-mute all Windows sounds (system beeps, WMP, DVD player, etc...) I've explored the object browser in VS 2008 but can't seem to find what I need: A mute that will affect all of Windows.

Is it System.Windows.Input.MediaCommands.MuteVolume and I'm just not getting how to use it?

Thanks for any pointers in the right direction using C# and/or WPF. :)

+4  A: 

I'm pretty sure that command is used by the individual WPF controls for muting. For instance, if the CommandTarget were a MediaElement, it would mute its sound when that command was executed. Unfortunately, I think you're going to have to do a bit more work. A quick google gave some examples for doing the p/invoke way, which is probably the only way to do it as of now in .NET:

For XP: MSDN

For Vista/7: CodeProject

Abe Heidebrecht
Thanks Abe. I appreciate the pointers.
Peter