Results 1 to 6 of 6

Thread: Open IE browser and go to website

  1. #1

    Thread Starter
    Addicted Member Rogier's Avatar
    Join Date
    Jun 2004
    Location
    Netherlands
    Posts
    143

    Exclamation Open IE browser and go to website

    Hi,

    Is it possible to open Internet Explorer and automaticly surf to a website?

  2. #2
    Fanatic Member vbasicgirl's Avatar
    Join Date
    Jan 2004
    Location
    Manchester, UK
    Posts
    1,016

    Re: Open IE browser and go to website

    try the api shellexecute. perfect for what you want.

    casey.

  3. #3

    Thread Starter
    Addicted Member Rogier's Avatar
    Join Date
    Jun 2004
    Location
    Netherlands
    Posts
    143

    Re: Open IE browser and go to website

    The what?
    I'm sorry, I'm pretty new with this stuff.
    Can you give me a little example code??

    Thank you!

  4. #4
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84

    Re: Open IE browser and go to website

    VB Code:
    1. Option Explicit
    2.  
    3. Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
    4. (ByVal hwnd As Long, ByVal lpOperation As String, _
    5. ByVal lpFile As String, ByVal lpParameters As String, _
    6. ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    7.  
    8. Private Const SW_NORMAL = 1
    9.  
    10. Private Sub Command1_Click()
    11.     ShellExecute 0, "Open", "http://www.google.com", 0&, App.Path, SW_NORMAL
    12. End Sub
    Anticipation of death is worse than death itself

  5. #5
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: Open IE browser and go to website

    isnt it sw_shownormal?

  6. #6
    Lively Member
    Join Date
    Aug 2002
    Location
    England
    Posts
    84

    Re: Open IE browser and go to website

    Quote Originally Posted by |2eM!x
    isnt it sw_shownormal?
    VB Code:
    1. Private Const SW_SHOWNORMAL = 1
    2.  Private Const SW_NORMAL = 1

    Yes, you may be right. But both constants have the same value, so it doesn't really matter.
    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