3

How do I open the microphone properties window when I click a button?

Phonon
  • 12,549
  • 13
  • 64
  • 114
Prince OfThief
  • 6,323
  • 14
  • 40
  • 53

3 Answers3

4

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)….

Community
  • 1
  • 1
sourcenouveau
  • 29,356
  • 35
  • 146
  • 243
4

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
Mark Heath
  • 48,273
  • 29
  • 137
  • 194
0

The right Code in C# with Windows10, and I Guess also in win7 is:

System.Diagnostics.Process.Start("mmsys.cpl",",1");
Joseba
  • 1
  • 1