KaKeeware
http://www.kakeeware.com
KaKeeware Silent Browser

Short Description

KaKeeware Silent Browser shows how to disable clicking sound after navigating to a new page, clicking the link or submitting the form in applications using embedded Web Controls (Internet Explorer control).

Full Description

This is basically the same code as for KaKeeware Browser, except one, significant change: there's no annoying clicking sound when the Web Control navigates to the new page, user clicks the link or submits the form.

Disabling IE click is a question that often pops up on the internet forum. The problem is, that there's no easy way to do so, and even the guys at MS admit that it can't be done without a trick.
So, the only way to fix it is to use homemade solution.

There are several ideas we can think of. The most common one relies on changing the System Sound Settings. Basically, before navigating to a new page, we need to disable 'clicking' sound by setting the name of the 'clicking' audio file in the Registry to "", and after navigation is completed, we restore it.

The value representing the name of the audio file is located here:
    HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\Navigating\[schema]
where [schema] is equal to the value that can be found under
    HKEY_CURRENT_USER\AppEvents\Schemes
Usually it's ".Current", so the full key presents itself as follows:
    HKEY_CURRENT_USER\AppEvents\Schemes\Apps\Explorer\Navigating\.Current

As per the discusssion on Code Project we may also need to send a message to all windows to make sure that IE refreshes its settings.

This solution is not very reliable and not very stable. If our application crashes, the settings will be lost permanently.

Another method that some programmers suggest is to disable the sound by changing the volume to zero before navigating or switching it off, but it can have the same negative impact on the system as in a case described above.

By looking how IE plays the 'clicking' audio file, we may find out that to perform this task it calls the functions within WinMM library. WinMM library, when loaded, creates the invisible top-level working window called 'MCI command handling window'. As it seems, to switch the sound off, it's enough to enumerate all the windows created within our program and destroy 'MCI command handling window' after it has been found.

The simplest way though, is to patch WinMM!PlaySoundW function to make it return right after the IE executes it, while trying to play the 'clicking' sound (and other sounds as well). This way, we make sure that no sound is played at all and there's no impact on the whole system, even our program crashes. There's a side effect of using this solution - we disable sound completely, but this is not important if we are embedding Web Control to use it for our own purpose i.e. not as a Web Browser, but as a control for showing dynamically created HTML content.

Requirements

Windows 2000/XP or newer

License

Freeware (+sources freely available)

Download

SilentBrowser

Thank you for your visit & support!
2004-2007 © Copyright KaKeeware. All Rights Reserved.