Web browsing

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi

How can run the internet explorer with a specific url from within my vb.net
app?

Thanks

Regards
 
Hi John,

Take a look at the topic "Webbrowser" and when you have questions about it,
do it from friday till sunday, because Charles knows the most of it, but he
watches this newsgroup only in the weekend.

Oh and a hint, use the AXwebbrowser not the webbrowser.
(but when you search for information do it with "webbrowser"

Cor
 
No not quite.
You need to add the MS Web Browser control in your toolbar which will import
the shocvw.dll file.
Add it to your project and say:

AxWebBrowser2.Navigate("http://www.yahoo.com")
 
Hi Cor

Actually, I do watch during the week, but I have more time at the weekend to
respond. Also, with all the recent problems with the newsgroups, I got a bit
fed up watching posts appear and then disappear so I stopped watching for a
bit. Good to see it's all back up and running though :-)

Regards

Charles
 
Hi John,

If you mean an embedded IE then Cor's pointing the way.

If you mean an external browser, the code below will do call the User's
default browser.

If you want more control over it, have a look at the members of Process

Regards,
Fergus

<code>
Imports System.Diagnostics

Public Sub CallBrowser (sUrl As String)
Try
Process.Start (sUrl)
Catch e As Exception
MsgBox ("Couldn't start Browser for " _
& sUrl & vbCrLf & vbCrLf & e.Message)
'or
Throw New Exception ("Couldn't start Browser for " & sUrl, e)
End Try
End Sub
</code>
 
Back
Top