[VB.Net] Testing needed for different webbrowsers
Could somebody test if this code would work for them:
Code:
Dim browser As String = String.Empty
If BrowserComboBox.SelectedIndex = 0 Then
'IE
browser = "IExplorer.exe"
ElseIf BrowserComboBox.SelectedIndex = 1 Then
'Mozilla
browser = "Firefox.exe"
ElseIf BrowserComboBox.SelectedIndex = 2 Then
'Chrome
browser = "Chrome.exe"
Else
'Opera
browser = "Opera.exe"
End If
Process.Start(browser, "www.google.com")
I only have IE downloaded and I'm in a position where I cannot download any other browsers. So if somebody could test if that would work on the different browsers, I'd greatly appreciate it.
Re: [VB.Net] Testing needed for different webbrowsers
It works for me for IE, Firefox, Chrome and Opera. I'm using Windows 7 x64 SP1.
Note that the process for IE is "IExplore.exe" not "IExplorer.exe."
Re: [VB.Net] Testing needed for different webbrowsers
Thank you very much. What I wound up doing is giving the user the option to navigate to their different webbrowsers and just storing the path in My.Settings.