Solved

Open URL in VB.NET

Posted on 2003-12-11
5
1,854 Views
Last Modified: 2010-05-18
How would one open a URL in VB.NET

example:
IExplorer.Open("http://www.google.com")

   - Marc
0
Comment
Question by:MarcGraff
  • 2
  • 2
5 Comments
 
LVL 48

Accepted Solution

by:
Mikal613 earned 500 total points
ID: 9922645
       Dim sURL As String = "c:\temp\cdrom.html"
        System.Diagnostics.Process.Start(sURL)
 
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 9922653
System.Diagnostics.Process.Start("http://www.google.com")
0
 
LVL 5

Expert Comment

by:seeflat
ID: 9922671
Imports System.Diagnostics

-------------------------------------------------------------------------

Dim procOptions = New ProcessStartInfo("C:\Program Files\Internet Explorer\iexplore.exe", "http:\\www.google.com")
procOptions.UseShellExecute = False  ' set to true to make silent/background
Dim myProcess = Process.Start(procOptions)

HTH
0
 
LVL 1

Author Comment

by:MarcGraff
ID: 9922716
Thank you!

   - Marc
0
 
LVL 5

Expert Comment

by:seeflat
ID: 9922727
Whoops! Didn't refresh; however while Mikal613's solution will work; you don't have a reference to the process.
With the way I do it, you can issue: myProcess.CloseMainWindow() and the window will close, among other possibilities.

I just don't like fire and forget stuff.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question