Mar 19, 2010 06:56 AM
(This post was last modified: Mar 19, 2010 07:45 AM by rawi16.)
as the title says , how i can do that ? for example if the webbrowser is on youtube (any video) to mute the sound of that video or any sound that coming from the webbrowser.
BUMP !!!
BUMP !!!
BUMP !!!
I suggest you visit the microsoft.public.inetsdk.programming.webbrowser_ctl newsgroup. I think that they got something like this.
wt is that ?
(msg aint that short)
(Mar 19, 2010 08:38 AM)rawi16 Wrote: wt is that ?
(msg aint that short)
http://www.microsoft.com/windows/ie/supp...howto.mspx
0-0
i still dont get it , how that suppose to help me ?
i tried that one , but as i remember it didnt work.
Code 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 RegistryKey = Registry.CurrentUser.OpenSubKey("AppEvents\Schemes\Apps\Explorer\Navigating\.Current", True)
key.SetValue(Nothing, "", RegistryValueKind.ExpandString)
End Sub
Put this in a Module, then on form load add DisableSound() - it works with all versions of windows.
thats wt i did :
module1.vb :
Code Imports Microsoft.Win32
Module Module1
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 RegistryKey = Registry.CurrentUser.OpenSubKey("AppEvents\Schemes\Apps\Explorer\Navigating\.Current", True)
key.SetValue(Nothing, "", RegistryValueKind.ExpandString)
End Sub
End Module
form1.vb :
Code Imports Microsoft.Win32
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DisableSound()
End Sub
End Class
and its not working.
any errors , or just still sound?
still sounds , no errors.
Just hide the webbrowser, like this
Code Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Visible = False
End Sub
It's work's for me fine.
tried , but the sound stays ,
Mar 20, 2010 12:29 AM
(This post was last modified: Mar 20, 2010 12:34 AM by Pr4wn.)
I had to modify it a bit to work in my vb 2008 so if mine doesn't work for you try the original code at links.
References:
http://stackoverflow.com/questions/39316...er-control
http://msdn.microsoft.com/en-us/library/...85%29.aspx
Code Private Const FEATURE_DISABLE_NAVIGATION_SOUNDS As Integer = 21
Private Const SET_FEATURE_ON_THREAD As Integer = &H1
Private Const SET_FEATURE_ON_PROCESS As Integer = &H2
Private Const SET_FEATURE_IN_REGISTRY As Integer = &H4
Private Const SET_FEATURE_ON_THREAD_LOCALMACHINE As Integer = &H8
Private Const SET_FEATURE_ON_THREAD_INTRANET As Integer = &H10
Private Const SET_FEATURE_ON_THREAD_TRUSTED As Integer = &H20
Private Const SET_FEATURE_ON_THREAD_INTERNET As Integer = &H40
Private Const SET_FEATURE_ON_THREAD_RESTRICTED As Integer = &H80
<Security.SecurityCritical(), Security.SuppressUnmanagedCodeSecurity(), Runtime.InteropServices.DllImport("urlmon.dll", ExactSpelling:=True)> _
Public Shared Function CoInternetSetFeatureEnabled(ByVal featureEntry As Integer, ByVal dwFlags As Integer, ByVal fEnable As Boolean) As Integer
End Function
'place this piece in a sub
CoInternetSetFeatureEnabled(FEATURE_DISABLE_NAVIGATION_SOUNDS, SET_FEATURE_ON_PROCESS, True)
What sound are you talking about? The click sound on loadings or like youtube videos sound?
Probably coding some useless shit.
|