Results 1 to 5 of 5

Thread: Im Back And need help with Internet Explorer

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Location
    The Glove state
    Posts
    28

    Cool

    Ok
    Well now that my loop is working I was hoping some one chould tell me how to make Internet Explorer go to a web site when I press a butten on my form
    Thanks

    P.s. the form will also hide and do other stuff when the butten is pressed
    Always let the Wookiee Win!

  2. #2
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    The simpliest way is to use ShellExecute:
    Code:
    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.vb-world.net", _
          "", "", vbNormalFocus
    End Sub
    Good luck!

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Aug 2000
    Location
    The Glove state
    Posts
    28

    Smile Thank, BUT

    where do I put the

    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
    Always let the Wookiee Win!

  4. #4
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    API declarations would usually go in a module but you can put it in a form if you put "Private Declare Function ...."
    Mark
    -------------------

  5. #5
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538

    Talking put the code where ???

    I'll nip in here & answer this bit!

    put a private before that and place the code right at the top of the form (above everything else).

    Hope this helps!
    Alex Read

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

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