Einzelnen Beitrag anzeigen

Benutzerbild von toms
toms
(CodeLib-Manager)

Registriert seit: 10. Jun 2002
4.648 Beiträge
 
Delphi XE Professional
 
#6

Re: webbrowser klackern abschalten

  Alt 11. Aug 2008, 18:16
Zitat von Neutral General:
Der Thread ist zwar alt, aber kann man diese Systemeinstellung mithilfe einer API abstellen?
Hallo,

Beim EWB gibt's eine DisableSounds Eigenschaft. Diese greift auf folgende Prozedur zurück:


Delphi-Quellcode:
procedure DisableNavSound(bDisable: Boolean);
var
  Reg: TRegIniFile;
  Path: string;
begin
  Reg := TRegIniFile.Create;
  Path := 'AppEvents\Schemes\Apps\Explorer\Navigating\';
  with Reg do
  begin
    RootKey := HKEY_CURRENT_USER;
    try
      if bDisable then
      begin
        if KeyExists(Path + '.Current') then
          if OpenKey(Path, True) then
            MoveKey('.Current', 'Old_Current', True);
      end
      else
      begin
        if KeyExists(Path + 'Old_Current') then
          if OpenKey(Path, false) then
            MoveKey('Old_Current', '.Current', True);
      end;
    finally
      CloseKey;
      Free;
    end;
  end;
end;
Thomas
  Mit Zitat antworten Zitat