Solved

Open URL in VB.NET

Posted on 2003-12-11
5
1,850 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

759 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now