Set System Volume Windows 10 in C#
<p>i searched like hours, now i ask in this Forum.</p>

<h2>How can I control the System Volume Setting of Windows 10?</h2>

<p>Which Libary I need?</p>

<p>I am using Visual Basic 2015 and wanna programm a Windows Universal App with C#.</p>

<h2>The programm should be able to:</h2>

<ul>
<li><p>Set Systemvolume to x%</p></li>
<li><p>increase the Systemvolume by x</p></li>
<li><p>decrease the Systemvolume by x</p></li>
<li><p>get the current Systemvolume</p></li>
</ul>

<p>I found a similar Question and Answer, but the Answer doesent work.</p>

<p>private void Mute()
        {</p>

<pre><code>        SendMessageW(new WindowInteropHelper(this).Handle, WM_APPCOMMAND, new WindowInteropHelper(this).Handle,
            (IntPtr)APPCOMMAND_VOLUME_MUTE);
    }
</code></pre>

<p>it can't find "WindowInteropHelper". But I implement:</p>

<p>using System;</p>

<p>using System.Windows.Forms;</p>

<p>using System.Runtime.InteropServices;</p>