Mute sound of application only?
Basically I want to mute the sound for my program only.
As you see one of the sound channels are form1 - I wish to mute this channel only.
http://img17.imageshack.us/img17/9821/soundgc.jpg
How would I do this?
By the way, the reason why I need to mute my application is because I want to mute the webbrowser in the application.
I've been searching for hours and still haven't found anything :(
Re: Mute sound of application only?
Well, you can easly disabled the 'click'-sound with some registry edit.
Disable:
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 Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("AppEvents\Schemes\Apps\Explorer\Navigating\.Current", True)
key.SetValue(Nothing, "", Microsoft.Win32.RegistryValueKind.ExpandString)
End Sub
Enable:
Code:
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
Then just run the "DisableSound()" function on WebBrowser_Navigating and "EnableSound()" on WebBrowser_DocumentCompleted.
http://tullebukk.net/img/15January_Sunday_44dldh.png
Hope this helps.
Re: Mute sound of application only?
Quote:
Originally Posted by
Merko
Well, you can easly disabled the 'click'-sound with some registry edit.
Disable:
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 Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.CurrentUser.OpenSubKey("AppEvents\Schemes\Apps\Explorer\Navigating\.Current", True)
key.SetValue(Nothing, "", Microsoft.Win32.RegistryValueKind.ExpandString)
End Sub
Enable:
Code:
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
Then just run the "DisableSound()" function on WebBrowser_Navigating and "EnableSound()" on WebBrowser_DocumentCompleted.
http://www.vbforums.com/
Hope this helps.
Thanks but what I need to do is to disable the sound webbrowser makes on youtube. I mean the youtube videos needs to be muted somehow.