Results 1 to 2 of 2

Thread: open html page

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2002
    Posts
    352

    open html page

    How do i open up an html page from visual basic? I just want to click a button and have ie pop up with the page open.

  2. #2
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84
    use the ShellExecute API for that

    VB Code:
    1. 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
    2. Private Const SW_NORMAL = 1
    3.  
    4. Private Sub Command1_Click()
    5.     ShellExecute Me.hwnd, "Open", "http://www.google.com", 0, "C:\", SW_NORMAL
    6. End Sub
    Anticipation of death is worse than death itself

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