0

I have code that is written to disable a notification sound after a website loads.
The issue is I do not know what the Name of that Notification Sound is.
I have tried just Notification by setting it to "nothing" with the control panel NO Luck.
Here is the code FWIW it is hard to write code if you do not know the names of the Ctr you want to apply changes to. So here is my best guess code.

Module Module1
Sub Main()
    Dim webPAGE As String = "http://www.example.com"
    OpenWebPage(webPAGE)
End Sub

Sub OpenWebPage(ByVal url As String)
    Try
        Dim startInfo As New ProcessStartInfo("chrome.exe", url)
        startInfo.UseShellExecute = True
        Process.Start(startInfo)
    Catch ex As Exception
        Console.WriteLine("An error occurred: " & ex.Message)
    End Try
End Sub

End Module

6
  • 1
    Does the same sound play when you use other browsers? I ask because, if not, the question probably relates to the Chrome browser and not Windows. Commented Jun 22 at 6:03
  • @jmcilhinney I agree it is Chrome At this time I only have one browser installed I did set NEC & Notifications to "none" with Control Panel it does not work for the first webpage I load but after closing it and loading other webpages it works code in datagridview look like this Process.Start("Chrome.exe", webPAGE) if that helps webPage is a string equal to URL thanks Commented Jun 22 at 6:13
  • 2
    This doesn't necessarily have anything to do with your issue but it's pointless to set UseShellExecute to True and then specify an executable as the file to run. The whole point of UseShellExecute is that you can specify a resource to open and let the Windows shell decide how to open it. If you specifically want to open the URL in Chrome then just call Process.Start and pass the EXE name and the URL as arguments. You only need UseShellExecute set to True if you specify the URL as the file name and let the OS open it in the user's default browser. Commented Jun 22 at 13:13
  • 1
    Even in that latter case, UseShellExecute will be True by default for a .NET Framework app anyway. It will be False by default for a .NET Core (including .NET 5 and later) app though. Commented Jun 22 at 13:14
  • 1
    It might be the "Start Navigation" sound in the Control Panel. Or it could come from a Chrome add-on - How to start Chrome without plugins? Commented Jun 23 at 9:29

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.