MrGil Posted March 14, 2012 at 08:24 PM Report #443988 Posted March 14, 2012 at 08:24 PM Boas, Existe alguma forma de fazer com que o Webbrowser não emita nenhum som (Como aquele "clique" quando se muda de pagina) Eu já andei à procura, e o melhor que encontrei foi isto: Public Class WebClickSound ''' <summary> ''' Enables or disables the web browser navigating click sound. ''' </summary> Public Shared Property Enabled() As Boolean Get Dim key As RegistryKey = Registry.CurrentUser.OpenSubKey("AppEvents\Schemes\Apps\Explorer\Navigating\.Current") Dim keyValue As String = DirectCast(key.GetValue(Nothing), String) Return [string].IsNullOrEmpty(keyValue) = False AndAlso keyValue <> """""" End Get Set(ByVal value As Boolean) Dim keyValue As String If value Then keyValue = "%SystemRoot%\Media\" If Environment.OSVersion.Version.Major = 5 AndAlso Environment.OSVersion.Version.Minor > 0 Then ' XP keyValue += "Windows XP Start.wav" ElseIf Environment.OSVersion.Version.Major = 6 Then ' Vista keyValue += "Windows Navigation Start.wav" Else MsgBox("Acontece") ' Don't know the file name so I won't be able to re-enable it Return End If Else keyValue = """""" End If ' Open and set the key that points to the file Dim key As RegistryKey = Registry.CurrentUser.OpenSubKey("AppEvents\Schemes\Apps\Explorer\Navigating\.Current", True) key.SetValue(Nothing, keyValue, RegistryValueKind.ExpandString) 'isEnabled = value End Set End Property End Class Mas não funciona... Existe alguma maneira simples de o fazer? Obrigado pela atenção
emanuelx Posted March 18, 2012 at 04:12 PM Report #444461 Posted March 18, 2012 at 04:12 PM Public Sub DisableSound() Dim keyValue As String keyValue = "%SystemRoot%\Media\" If Environment.OSVersion.Version.Major = 5 AndAlso Environment.OSVersion.Version.Minor > 0 Then keyValue += "Windows XP Start.wav" ElseIf Environment.OSVersion.Version.Major = 6 Then keyValue += "Windows Navigation Start.wav" Else Return End If Dim key As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("AppEvents\Schemes\Apps\Explorer\Navigating\.Current", True) key.SetValue(Nothing, "", Microsoft.Win32.RegistryValueKind.ExpandString) End Sub Public Sub EnableSound() Dim keyValue As String keyValue = "%SystemRoot%\Media\" If Environment.OSVersion.Version.Major = 5 AndAlso Environment.OSVersion.Version.Minor > 0 Then keyValue += "Windows XP Start.wav" ElseIf Environment.OSVersion.Version.Major = 6 Then keyValue += "Windows Navigation Start.wav" Else Return End If Dim key As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("AppEvents\Schemes\Apps\Explorer\Navigating\.Current", True) key.SetValue(Nothing, keyValue, Microsoft.Win32.RegistryValueKind.ExpandString) End Sub com calma e sem stresses
MrGil Posted March 18, 2012 at 05:15 PM Author Report #444465 Posted March 18, 2012 at 05:15 PM emanuelx, obrigado! Funcionou na perfeição!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now