How do I open the microphone properties window when I click a button?
There is nothing built in to WPF for opening the Microphone properties window. This is a .NET feature. Are you using C#?
If you want to open the Volume Control on Windows, you could just run the sndvol32.exe
executable:
string lWinDir = Environment.GetEnvironmentVariable("windir");
string lSndVolPath = lWinDir + @"\system32\sndvol32.exe";
Process lVolumeControl = Process.Start(lSndVolPath);
See also How to adjust microphone gain from C# (needs to work on XP & W7)….
For Windows XP, starting sndvol32.exe will open the mixer. If you pass "-R" in as parameter, it will take you directly to the "Recording View", where you can set microphone gain.
sndvol32.exe -R
Unfortunately this will not work in Windows 7. Win 7 has a program called sndvol.exe but it doesn't seem to have a record settings mode. The best solution I have found is to open up the Sound control panel item with the Recording tab active using the following command:
control mmsys.cpl,,1
-
How do I call this command? I try Process lVolumeControl = Process.Start("control mmsys.cpl,,1") but It's not working : "The system cannot find the file specified" – Prince OfThief Dec 1 '10 at 5:01
-
3
The right Code in C# with Windows10, and I Guess also in win7 is:
System.Diagnostics.Process.Start("mmsys.cpl",",1");