Open Internet Explorer URL when Clicking a button

  • Thread starter Thread starter Stewart Saathoff
  • Start date Start date
S

Stewart Saathoff

Hello,

Does anyone know how to open an Internet Explorer URL with a specified Path
when someone clicks a URL?
 
Hi Stewart.

Just distributed to this newsgroup yesterday

\\\ by Herfried. K. Wagner
Dim psi As New ProcessStartInfo
psi.FileName = "http://www.bla.foo"
psi.UseShellExecute = True
Process.Start(psi)
///

I hope this helps?

Cor
 
That does work, but I am trying to force images to open in internet explorer
from a file system location. For example, if the path to the image is
"c:\work\image.jpg", I want the image to open in internet explorer when I
click the button.
 
Stewart

Have for that a look to the Internet Explorer Object Navigate2, (not the
webbrowser).

I thought you could do it with that

Cor
 
? I don't understand what you mean.

Cor said:
Stewart

Have for that a look to the Internet Explorer Object Navigate2, (not the
webbrowser).

I thought you could do it with that

Cor
 
Hi Steward,
? I don't understand what you mean.

I thought it was not so difficult but here you have the code
\\\
'set a reference to the microsoft internet controls

Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs _
) Handles Button1.Click
Dim ie As SHDocVw.InternetExplorer _
= New SHDocVw.InternetExplorer
ie.Visible = True
ie.Navigate2("c:\stewart.gif")
////

Was this what you did want to do?

Cor
 
* "Cor said:
Just distributed to this newsgroup yesterday

\\\ by Herfried. K. Wagner
Dim psi As New ProcessStartInfo
psi.FileName = "http://www.bla.foo"
psi.UseShellExecute = True
Process.Start(psi)
///

Thanks. Notice that I don't claim this code to be my intellectual
property.

;-)
 
Back
Top