|
using System.Runtime.InteropServices;
namespace CodeProjectArticleEditor
{
static class ClickSoundDisabler
{
// ---------------------------------------------------
// CodeProjectArticleEditor > ClickSoundDisabler.cs
// ---------------------------------------------------
// CodeProject Article Editor
// Huseyin Atasoy
// atasoyweb.net [at] gmail.com
// www.atasoyweb.net
// September 2012
// ---------------------------------------------------
private const int FEATURE_DISABLE_NAVIGATION_SOUNDS = 21;
private const int SET_FEATURE_ON_PROCESS = 0x00000002;
[DllImport("urlmon.dll")]
[PreserveSig]
[return: MarshalAs(UnmanagedType.Error)]
private static extern int CoInternetSetFeatureEnabled(int FeatureEntry, [MarshalAs(UnmanagedType.U4)] int dwFlags, bool fEnable);
public static void disableClickSound()
{
try
{
CoInternetSetFeatureEnabled(FEATURE_DISABLE_NAVIGATION_SOUNDS, SET_FEATURE_ON_PROCESS, true);
}
catch{}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.