|
-
Sep 20th, 2000, 08:05 PM
#1
Thread Starter
Addicted Member
Can someone tell me how to reference the webbrowser object?
Thanks
-
Sep 20th, 2000, 09:26 PM
#2
Click Project > References... and make sure Microsoft Internet Controls is checked and click OK.
Here is a little code to get you started:
Code:
Dim ie As New InternetExplorer
Private Sub Form_Load()
ie.Navigate "http://www.vb-world.net
ie.Visible = True
End Sub
A list of stuff will come up as you type "ie."
You should know what to do from there.
-
Sep 20th, 2000, 10:16 PM
#3
Thread Starter
Addicted Member
Thanks Matthew
Is this the samething as what Dim did in this posting? I am referring to the last one.
http://209.207.250.147/showthread.php?threadid=29273
Thanks
-
Sep 20th, 2000, 10:30 PM
#4
I didn't know that. This is not Dims. I did write the whole thing out myself to tell you how to do it. I didn't look to find how to do this, I knew it.
-
Sep 21st, 2000, 01:55 AM
#5
Thread Starter
Addicted Member
Thanks for your effort.
Sorry for the misunderstanding Matthew. I mean does your code do the samething as Dim. I did not mean you copy Dim's code.
-
Sep 21st, 2000, 12:18 PM
#6
Fanatic Member
Different Things
Hi Shark.
The code that Matthew provided and D!m's code are two different things. Matthew should you how to reference the Internet Explorer object. D!m's code shows how to create your own webbrowser object (by adding a component to your project rather than a reference). Although the webbrowser object uses the functionality of IE, when you place the object on your form, you have to code the logic for it's operations. This isn't the case with Matthew's example, where you use the IE app itself.
All the best.
-
Sep 21st, 2000, 12:28 PM
#7
Thread Starter
Addicted Member
Thanks for your reply OneSource
Can you show me how to reference it and get start it like Dim?
-
Sep 21st, 2000, 01:19 PM
#8
Fanatic Member
Shark,
In your VB project, go to Project, Components and select Microsoft Internet Controls (this is the webbrowser object). Draw the control on your form and that's your webbrowser! From there you can use D!m's example (webbrowser1.Navigate2 "www.vb-world.net"). For more info., click here
All the best.
-
Sep 21st, 2000, 01:33 PM
#9
Sorry for misunderstanding you.
Can someone tell me how to reference the webbrowser object?
Referencing a control and adding one to your form are two different things.
When you reference a control, you can open it externally without having it on your form.
If you add a control to your form, obviously, you have to use it on your form.
Here are the basics of the Webbrowser Control, if that's what your going for.
Code:
'Go to the previous webpage
WebBrowser1.GoBack
'Go to the present webpage
WebBrowser1.GoForward
'Go to the default IE home
WebBrowser1.GoHome
'Go to the default search page
WebBrowser1.GoSearch
'Refresh the current webpage
WebBrowser1.Refresh
'Navigate to a webpage
WebBrowser1.Navigate "www.vb-world.net"
Hope that helps.
-
Sep 21st, 2000, 04:36 PM
#10
Thread Starter
Addicted Member
-
Sep 21st, 2000, 05:34 PM
#11
Fanatic Member
Anytime Shark...
We have to help you because you might bite us if we don't!
-
Sep 21st, 2000, 07:28 PM
#12
Thread Starter
Addicted Member
Ok, I won't bite you!
How did Dim get the commands after Document.? There is no drop down for it.
WebBrowser1.Document.Forms(0).login.Value = "my login name"
WebBrowser1.Document.Forms(0).passwd.Value = "mypassword"
WebBrowser1.Document.Forms(0).enter.Click
-
Sep 21st, 2000, 09:52 PM
#13
Fanatic Member
Shark,
D!m probably learned the commands from MSDN or some other reference source. That's one of the weird things that I learned when using the webbrowser object with VB. Although the intellisense (the drop-down lists) didn't work, the commands worked anyway!
If you search for "webbrowser object" here on VB-World, I'm sure that you can find a lot of useful information.
All the best.
-
Sep 21st, 2000, 10:30 PM
#14
Thread Starter
Addicted Member
Your help is appreciated today OneSource.
You won't get bite from this Great White.
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
|