I have a webbrowser control on my form that runs in the background. The page is constantly refreshing. So I hear the refresh click everytime. Is there a way to mute it?
Thanks,
I have a webbrowser control on my form that runs in the background. The page is constantly refreshing. So I hear the refresh click everytime. Is there a way to mute it?
Thanks,
You can use following code snippet to solve this problem. It makes use of url monitor dll.
const int FEATURE_DISABLE_NAVIGATION_SOUNDS = 21;
const int SET_FEATURE_ON_PROCESS = 0x00000002;
[DllImport("urlmon.dll")]
[PreserveSig]
[return: MarshalAs(UnmanagedType.Error)]
static extern int CoInternetSetFeatureEnabled(
int FeatureEntry,
[MarshalAs(UnmanagedType.U4)] int dwFlags,
bool fEnable);
static void DisableClickSounds()
{
CoInternetSetFeatureEnabled(
FEATURE_DISABLE_NAVIGATION_SOUNDS,
SET_FEATURE_ON_PROCESS,
true);
}