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 website when button pressed

Opening a website when button pressed

Scheduled Pinned Locked Moved Visual Basic
3 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.
  • G Offline
    G Offline
    GaryKoh
    wrote on last edited by
    #1

    hello i wish to know the coding for the button that perform opening either Internet Explore or Netscape to a web address i hope it wont be a trouble thank you Gary

    G 1 Reply Last reply
    0
    • G GaryKoh

      hello i wish to know the coding for the button that perform opening either Internet Explore or Netscape to a web address i hope it wont be a trouble thank you Gary

      G Offline
      G Offline
      gpa2000
      wrote on last edited by
      #2

      In VB: ' ' Procedure voor het opstarten van de default browser met een URL ' ' Zie Q224816, Q174156 voor meer informatie ' Public Sub StartDefaultBrowser(ByVal strUrl As String) Dim lngReturnValue As Long lngReturnValue = ShellExecute(0, _ "open", _ strUrl, _ 0, _ 0, _ SW_SHOWNORMAL) ' Returnvalue <= 32 means error If (lngReturnValue <= 32) Then Err.Raise ERR_WARNING, FormatErrSource(MODULENAME, "CheckFields"), "Can't start default internet browser (" & CStr(lngReturnValue) & ")" End If End Sub Grtz, Guus

      G 1 Reply Last reply
      0
      • G gpa2000

        In VB: ' ' Procedure voor het opstarten van de default browser met een URL ' ' Zie Q224816, Q174156 voor meer informatie ' Public Sub StartDefaultBrowser(ByVal strUrl As String) Dim lngReturnValue As Long lngReturnValue = ShellExecute(0, _ "open", _ strUrl, _ 0, _ 0, _ SW_SHOWNORMAL) ' Returnvalue <= 32 means error If (lngReturnValue <= 32) Then Err.Raise ERR_WARNING, FormatErrSource(MODULENAME, "CheckFields"), "Can't start default internet browser (" & CStr(lngReturnValue) & ")" End If End Sub Grtz, Guus

        G Offline
        G Offline
        GaryKoh
        wrote on last edited by
        #3

        thank you very much Gary

        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