0

I would like to check if a particular web page is opened in the default browser, but I really have no idea how to do so. So far, I have use Process.Start("xxx") to open the page I wanted in the default browser.

Dim website As String
website = "http://www.google.com"
'If http://www.google.com is not opened
    Try
        Process.Start(website)
    Catch ex As Exception
        MsgBox("Something wrong happened" & vbCrLf & ex.Message, MsgBoxStyle.OkOnly, "Cannot open the page")
    End Try

In all the solutions I've seen so far, this is done by specify the browser...

Pookye
  • 89
  • 1
  • 3
  • 13
  • 1
    Possible duplicate of [How can I check if website is already opened in a webbrowser?](https://stackoverflow.com/questions/19098535/how-can-i-check-if-website-is-already-opened-in-a-webbrowser) – djv Aug 02 '18 at 15:58
  • Also see [this answer](https://stackoverflow.com/a/10588918/832052). – djv Aug 02 '18 at 15:59
  • @djv thank you for the links, that's the ones I saw before writing my question. So that's what I thought, I have to write something for each of the browsers that may be used. Guess I have no choice – Pookye Aug 10 '18 at 05:55

0 Answers0