Results 1 to 4 of 4

Thread: Internet Explorer

  1. #1

    Thread Starter
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345
    How do I use IE with VB?

    I need to write a browser program with IE functionality, and I want to avoid the Internet control.
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  2. #2
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    Add a reference to Microsoft Internet Controls and then you can use something like this:
    Code:
    Private Sub Command1_Click()
    Dim i As SHDocVw.InternetExplorer
    Set i = New InternetExplorer
    i.Visible = True
    i.Navigate "http://www.altavista.com"
    End Sub
    There are a lot of stuff you can do. Explore them using the object browser.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  3. #3

    Thread Starter
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    I had tried a similar approach, only the object i was declared as InternetExplorer and not as SHDocVW.InternetExplorer.

    The subsequent efforts of creating a new instance of the IE failed, probably because of the declaration.

    Thanks for the tip. I shall try it out and let you know if it worked or not.



    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  4. #4
    Lively Member
    Join Date
    Nov 2000
    Posts
    73
    hi,
    try this pease of code get back if any problem

    Private Const INTERNET_INVALID_PORT_NUMBER = 0
    Private Const INTERNET_OPEN_TYPE_PRECONFIG = 0
    Private Const INTERNET_SERVICE_HTTP = 3

    lHandle = InternetOpen(App.EXEName, INTERNET_OPEN_TYPE_PRECONFIG, vbNullString, vbNullString, 0)

    lConnection = InternetConnect(plHandle, http://www.altavista.com, INTERNET_INVALID_PORT_NUMBER, "", "", INTERNET_SERVICE_HTTP, 0, 0)

    lRequest = HttpOpenRequest(plConnection, "GET", vbNullString, "HTTP/1.0", "", 0, _
    INTERNET_FLAG_RELOAD Or INTERNET_FLAG_KEEP_CONNECTION, 0)

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