Reputation: 6423
How do I open the microphone properties window when I click a button?
Upvotes: 3
Views: 6671
Reputation: 1
The right Code in C# with Windows10, and I Guess also in win7 is:
System.Diagnostics.Process.Start("mmsys.cpl",",1");
Upvotes: 0
Reputation: 49522
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
Upvotes: 4
Reputation: 30554
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)….
Upvotes: 4