VB.NET - SHDocVw DLL Alternative for Microsoft Edge Browser on Windows 10

Sid Marker 1 Reputation point
2022-06-24T07:56:32.897+00:00

Dear Team,

Our project is using the SHDocVw DLL reference, to set some browser properties, after which a link is opened in the Internet Explorer application. We're using the below code:

Dim browserIE as SHDocVw.InternetExplorer
browserIE = New SHDocVw.InternetExplorer
browserIE.AddressBar = False
browserIE.MenuBar = False
browserIE.StatusBar = False
browserIE.Toolbar = False
browserIE.Visible = False
Dim browserUrl As String = "https://www.google.com"
browserIE.Navigate(browserUrl)

However, as the Internet Explorer application is retired, we are trying to migrate to Microsoft Edge. Since the SHDocVw reference is only applicable for the Internet Explorer browser, we're unable to find how the same can be replicated for the Microsoft Edge browser.

We tried the below code for opening links in the Microsoft Edge browser, but we're unable to set the browser properties, like we set using the SHDocVw reference:

Dim browserUrl As String "https://www.google.com"
Dim NewProcess As Diagnostics.ProcessStatrInfo = New Diagnostics.ProcessStartInfo("msedge", browserUrl)
NewProcess.UseShellExecute = True
Diagnostics.Process.Start(NewProcess)

We also tried the Kiosk mode, but it doesn't satisfy our requirements. Also, WebBrowser control (i.e. opening browser in Windows Forms) does not fit into our requirements.

Is there a way in which we can hide certain properties of the Microsoft Edge browser (such as address bar, menu bar, status bar, toolbar) through our application code, before we open it to navigate to a link, like the one done using ShDocVw DLL for the Internet Explorer browser?

Thanks,
Sid.

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
1,333 questions
No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Castorix31 65,461 Reputation points
    2022-06-24T08:17:12.817+00:00

    The "official" control is WebView2
    that you can configure with interfaces like CoreWebView2WindowFeatures, CoreWebView2Settings