Good afternoon. I am developing a gmail app for my personal consumption for now and it has a lot of bells and whistles including showing me the latest emails coming in, playing a sound and changing icon when there is new mail and a few other things. I am using the webbrowser control and reading the source etc from within the control and since my default browser is not IE, of course, I am trying to divert the URLs in the emails to open in my default browser which works fine, except everytime I click a link it pops up a box letting me know I am using a popup blocker and I should disable it for gmail to work better. I have tried to find the popup boxes code to remove it from the webbrowser control's display as well as a few other things and nothing works. Can anyone help me with disabling this popup? The code I am using to divert the link to my default browser is below and let me know if you need any more info.
Private Sub WebBrowser1_NewWindow(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles WebBrowser1.NewWindow Dim webbrowser As WebBrowser = sender OpenWebsite(webbrowser.StatusText.ToString()) webbrowser = Nothing e.Cancel = True End Sub Public Sub OpenWebsite(url As String) 'If Not System.IO.File.Exists("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe") Then 'Process.Start("C:\Program Files\Google\Chrome\Application\chrome.exe", url) 'Else 'Process.Start("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", url) 'End If NavigateWebURL(url) 'NavigateWebURL("http://www.google.com", "Firefox") '// safari Firefox chrome etc 'Process.Start("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe", url) End Sub Private Sub NavigateWebURL(ByVal URL As String, Optional browser As String = "default") If Not (browser = "default") Then Try '// try set browser if there was an error (browser not installed) Process.Start(browser, URL) Catch ex As Exception '// use default browser Process.Start(URL) End Try Else '// use default browser Process.Start(URL) End If End Sub
Thanks a bunch for taking a look and for any help you can give me!