有谁知道From窗体怎么对音频进行静音非静音控制的源代码;
线上等~
[DllImport("user32.dll", CharSet = CharSet.Auto, SetLastError = true)]
private static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, uint wParam, uint lParam);
private const uint WM_APPCOMMAND = 0x319;
private const uint APPCOMMAND_VOLUME_MUTE = 0x08;
private void BtnVolumeMute_Click(object sender, EventArgs e)
{
SendMessage(Handle, WM_APPCOMMAND, 0x200eb0, APPCOMMAND_VOLUME_MUTE * 0x10000);
}
谢谢