tags:

views:

472

answers:

4

Is there an easy way to set the volume from managed .net code?

+1  A: 

This rather long article shows how: Controlling sound volume in C#

Mitch Wheat
+1  A: 

Duplicate see here: http://stackoverflow.com/questions/294292/changing-master-volume-level

Magnus Johansson
This should be posted as a comment. Voted to close, anyway.
Noldorin
+1  A: 

This CodeProject article demonstrates how you fully control the Windows Mixer settings, including the master volume for the system. It seems to wrap most of the horrible Win API stuff, so it's probably the easiest way to go.

Noldorin
+1  A: 

Simple answer: You have to use interop.

I wrote a library to do all kinds of sound stuff for you, tho:

WinnMM.Net: http://winmm.codeplex.com/

John Gietzen