Results 1 to 4 of 4

Thread: [RESOLVED] Very Simple Question, Shell Default Browser To Url

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2008
    Posts
    39

    Resolved [RESOLVED] Very Simple Question, Shell Default Browser To Url

    What code do I use to open users default web browser to a webpage?

  2. #2
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Very Simple Question, Shell Default Browser To Url

    Code:
    Option Explicit
    
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    
    Private Sub Command1_Click()
        ShellExecute Me.hwnd, "open", _
        "http://www.theurl.com", vbNullString, vbNullString, 1&
    End Sub

  3. #3

    Thread Starter
    Member
    Join Date
    Mar 2008
    Posts
    39

    Re: Very Simple Question, Shell Default Browser To Url

    Quote Originally Posted by DigiRev
    Code:
    Option Explicit
    
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    
    Private Sub Command1_Click()
        ShellExecute Me.hwnd, "open", _
        "http://www.theurl.com", vbNullString, vbNullString, 1&
    End Sub
    Thanks digirev

  4. #4
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: [RESOLVED] Very Simple Question, Shell Default Browser To Url

    You're welcome.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width