Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Opening a web page in the default web browser.

Opening a web page in the default web browser.

Scheduled Pinned Locked Moved Visual Basic
csharpcom
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    robertw019
    wrote on last edited by
    #1

    how do you open a web page in the default web browser using vb.net http://ixpress.sourceforge.net/feedmonster http://simpleread.blogspot.com

    L 1 Reply Last reply
    0
    • R robertw019

      how do you open a web page in the default web browser using vb.net http://ixpress.sourceforge.net/feedmonster http://simpleread.blogspot.com

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      System.Diagnostics.Process.Start(WebURL) ... where WebURL is a string containing the URL of a web site "Evidently your parents slapped together version 1.0 of you and hoped no one would notice the bugs." ... Dogbert (tech support)

      L 1 Reply Last reply
      0
      • L Lost User

        System.Diagnostics.Process.Start(WebURL) ... where WebURL is a string containing the URL of a web site "Evidently your parents slapped together version 1.0 of you and hoped no one would notice the bugs." ... Dogbert (tech support)

        L Offline
        L Offline
        Lost User
        wrote on last edited by
        #3

        If you want to test if the URL is reachable (e.g. an Internet connection is available and the URL is valid), pass the URL string to this function. Private Function WebSiteIsAvailable(ByVal linkText As String) As Boolean Dim URL_Object As New System.Uri(linkText) Dim URL_WebRequest As System.Net.WebRequest Dim URL_WebResponse As System.Net.WebResponse Dim Response_Result As Boolean ' Attempt to get a response from the URL Try URL_WebRequest = System.Net.WebRequest.Create(URL_Object) URL_WebResponse = URL_WebRequest.GetResponse Response_Result = True Catch Any_Error As Exception Response_Result = False End Try URL_WebResponse = Nothing URL_WebRequest = Nothing URL_Object = Nothing ' Return the result Return Response_Result End Function "Evidently your parents slapped together version 1.0 of you and hoped no one would notice the bugs." ... Dogbert (tech support)

        R 1 Reply Last reply
        0
        • L Lost User

          If you want to test if the URL is reachable (e.g. an Internet connection is available and the URL is valid), pass the URL string to this function. Private Function WebSiteIsAvailable(ByVal linkText As String) As Boolean Dim URL_Object As New System.Uri(linkText) Dim URL_WebRequest As System.Net.WebRequest Dim URL_WebResponse As System.Net.WebResponse Dim Response_Result As Boolean ' Attempt to get a response from the URL Try URL_WebRequest = System.Net.WebRequest.Create(URL_Object) URL_WebResponse = URL_WebRequest.GetResponse Response_Result = True Catch Any_Error As Exception Response_Result = False End Try URL_WebResponse = Nothing URL_WebRequest = Nothing URL_Object = Nothing ' Return the result Return Response_Result End Function "Evidently your parents slapped together version 1.0 of you and hoped no one would notice the bugs." ... Dogbert (tech support)

          R Offline
          R Offline
          robertw019
          wrote on last edited by
          #4

          thanks i think this will do it

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups