I have a Web Browser in my WPF application which plays a Flash, but the Flash has audio and I don't want the users to hear it. I'm assuming that there has to be some way to mute either the Web Browser, the Window or the entire Application. I've tried stuff like the following, but nothing has worked. Could I get some assistance, please?
private const int APPCOMMAND_VOLUME_MUTE = 0x80000;
private const int WM_APPCOMMAND = 0x319;
[DllImport("user32.dll")]
public static extern IntPtr SendMessageW(IntPtr hWnd, int Msg, IntPtr wParam,
IntPtr lParam);
public EditTags() {
IntPtr windowHandle = new WindowInteropHelper(this).Handle;
SendMessageW(windowHandle, WM_APPCOMMAND, windowHandle, (IntPtr)
APPCOMMAND_VOLUME_MUTE);
}
EDIT: A solution has been found by Jimi.
Link for those who want it: Webbrowser disable all audio output - from online radio to youtube.