none
diagnostics.process.start will stat any default browser except IE RRS feed

  • Question

  • I've ben using this code for years...

     

    Dim proc As New System.Diagnostics.Process

     

    proc.StartInfo.UseShellExecute = True

    proc.Start(AppViewLocation) 'AppViewLocation is a String containing my URI

    All of a sudden since my last release it can no longer open a new IE  7 window; It says "The system cannot find the file specified". It will add a tab to an already open IE window and it will open new windows in other browsers when I set them to be my default. But I need it again to open a new IE browser window if one isn't already open. What's changed? Is there an IE configuration setting I should know about?

    Thanks for your help.
    EduCoder1

    Thursday, January 21, 2010 2:31 PM

Answers

  • Hi EduCoder1,

    If you need to open a new IE browser window, you can use Early binding in this code sample. In this situation you need to add the oldest IE version in COM reference.

    Please try the following code snippet. In your project->Add reference-> COM->Microsoft Internet controls and Microsoft Html object Library.

    Imports mshtml
    Imports SHDocVw
    Public Class Form1
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim wbBrowser As New SHDocVw.InternetExplorer
            wbBrowser.Visible = True
            wbBrowser.Navigate("http://www.bing.com/", Nothing, Nothing, Nothing, Nothing)
            Do
            Loop Until Not wbBrowser.Busy
        End Sub
    End Class


    Best regards,
    Riquel
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by EduCoder1 Friday, January 22, 2010 3:36 PM
    Friday, January 22, 2010 6:40 AM
    Moderator

All replies

  • Hi EduCoder1,

    If you need to open a new IE browser window, you can use Early binding in this code sample. In this situation you need to add the oldest IE version in COM reference.

    Please try the following code snippet. In your project->Add reference-> COM->Microsoft Internet controls and Microsoft Html object Library.

    Imports mshtml
    Imports SHDocVw
    Public Class Form1
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim wbBrowser As New SHDocVw.InternetExplorer
            wbBrowser.Visible = True
            wbBrowser.Navigate("http://www.bing.com/", Nothing, Nothing, Nothing, Nothing)
            Do
            Loop Until Not wbBrowser.Busy
        End Sub
    End Class


    Best regards,
    Riquel
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by EduCoder1 Friday, January 22, 2010 3:36 PM
    Friday, January 22, 2010 6:40 AM
    Moderator
  • Ah thank you Riquel,

    This looks most promising! I've been searching for a couple days for the solution and found vague references to SHDocVw but you've cleared things up enough to be useful.

    Have a great day!
    Friday, January 22, 2010 3:36 PM