首页 新闻 会员 周边 捐助

静音非静音~在线急等

0
[待解决问题]

有谁知道From窗体怎么对音频进行静音非静音控制的源代码;
线上等~

`MC的主页 `MC | 菜鸟二级 | 园豆:202
提问于:2020-12-01 16:20
< >
分享
所有回答(1)
0
[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);
}
Denuin+ | 园豆:232 (菜鸟二级) | 2020-12-03 09:48

谢谢

支持(0) 反对(0) `MC | 园豆:202 (菜鸟二级) | 2020-12-04 09:36
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册