Results 1 to 3 of 3

Thread: [VB.Net] Testing needed for different webbrowsers

  1. #1

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,715

    [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.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

  2. #2
    PowerPoster kfcSmitty's Avatar
    Join Date
    May 2005
    Posts
    2,248

    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."

  3. #3

    Thread Starter
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Location
    South Louisiana
    Posts
    11,715

    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.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | Code Tags | Sword of Fury - Jameram

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width