Results 1 to 5 of 5

Thread: open webpage in default browser problem [Resolved]

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2005
    Posts
    31

    Resolved open webpage in default browser problem [Resolved]

    ok, i want to get a webpage to open up in the default browser when you click a button. i found this code from the codebank.

    VB Code:
    1. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" ( _
    2.     ByVal hWnd As Long, _
    3.     ByVal lpOperation As String, _
    4.     ByVal lpFile As String, _
    5.     ByVal lpParameters As String, _
    6.     ByVal lpDirectory As String, _
    7.     ByVal nShowCmd As Long) As Long
    8.  
    9. Private Sub OpenURL(strURL As String)
    10.     ShellExecute Me.hWnd, "open", strURL, vbNullString, "C:\", ByVal 1&
    11.     ' Change the last perameter to 0& if you do not whant to show the window.
    12. End Sub

    i cant get this to work. and im wondering if anyone could lend a hand?
    Last edited by Bored Teenager; Jun 11th, 2005 at 05:51 PM.
    Thanks for the help
    - Bored Teenager -

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