start IE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Anonymous

    #1

    start IE

    How do I start Internet Explorer a second time in the same window,
    replacing the first displayed html-file. Don't want to start a new instance,
    don't want to mess with users (registry) settings.

    / .


  • Peter Proost

    #2
    Re: start IE

    Hi Anonymous,

    this works for me, put a button on a form and add this code:

    Private teller As Integer = 0
    Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
    System.EventArg s) Handles _ Button1.Click
    teller += 1
    If teller = 1 Then
    System.Diagnost ics.Process.Sta rt("http://www.google.com" )
    Else
    System.Diagnost ics.Process.Sta rt("http://www.yahoo.com")
    teller = 0
    End If
    End Sub

    hth Greetz Peter

    --
    Programming today is a race between software engineers striving to build
    bigger and better idiot-proof programs, and the Universe trying to produce
    bigger and better idiots. So far, the Universe is winning.
    "Anonymous" <anonymous@noem ail.com> schreef in bericht
    news:#wROFcUXFH A.3176@TK2MSFTN GP12.phx.gbl...[color=blue]
    > How do I start Internet Explorer a second time in the same window,
    > replacing the first displayed html-file. Don't want to start a new[/color]
    instance,[color=blue]
    > don't want to mess with users (registry) settings.
    >
    > / .
    >
    >[/color]


    Comment

    • Herfried K. Wagner [MVP]

      #3
      Re: start IE

      "Peter Proost" <pproost@nospam .hotmail.com> schrieb:[color=blue]
      > this works for me, put a button on a form and add this code:
      >
      > Private teller As Integer = 0
      > Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
      > System.EventArg s) Handles _ Button1.Click
      > teller += 1
      > If teller = 1 Then
      > System.Diagnost ics.Process.Sta rt("http://www.google.com" )
      > Else
      > System.Diagnost ics.Process.Sta rt("http://www.yahoo.com")
      > teller = 0
      > End If[/color]

      That's how I would solve the problem too...

      When showing a webpage from within a program, I /would not/ call a specific
      browser. Instead, I'd launch the document in the default browser. If the
      user has chosen to reuse browser instances, then they should be reused. If
      the user wants the page to be shown in a
      separate browser window, he/she should uncheck the option to reuse existing
      browser windows.

      --
      M S Herfried K. Wagner
      M V P <URL:http://dotnet.mvps.org/>
      V B <URL:http://classicvb.org/petition/>

      Comment

      Working...