|
-
Nov 22nd, 2000, 02:40 PM
#1
Thread Starter
Randalf the Red
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.
-
Nov 22nd, 2000, 03:13 PM
#2
Frenzied Member
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.
-
Nov 22nd, 2000, 07:43 PM
#3
Thread Starter
Randalf the Red
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.
-
Nov 23rd, 2000, 02:42 AM
#4
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|