|
-
Feb 6th, 2007, 08:48 PM
#1
Thread Starter
Hyperactive Member
[RESOLVED] [02/03] Web Browser Control Problem
Hi guys!!!
How do I click the link of a page in a web browser control.
I tried searching everywhere and all I get is VB 2005 ang 6.0.
I already created a Web browser control and navigated to the website.
How do I click the link that says "Click me here".
Rate Me! Rate Me! Rate Me!
Time to fly.
Copyright GraysonSoft Inc. 2007
-
Feb 6th, 2007, 08:53 PM
#2
Re: [02/03] Web Browser Control Problem
Any VB6 examples you get should be almost directly applicable because the control you're using is ActiveX, not WinForms.
-
Feb 6th, 2007, 09:30 PM
#3
Thread Starter
Hyperactive Member
Re: [02/03] Web Browser Control Problem
 Originally Posted by jmcilhinney
Any VB6 examples you get should be almost directly applicable because the control you're using is ActiveX, not WinForms.
Hi Jm,
Can you give me some examples. I might be missing a lot. This is my first time manipulating IE through VB.
A simple one is enough.
Rate Me! Rate Me! Rate Me!
Time to fly.
Copyright GraysonSoft Inc. 2007
-
Feb 6th, 2007, 10:06 PM
#4
Re: [02/03] Web Browser Control Problem
I thought you said that you'd already found some VB6 examples. I don't know of any specifically because I've never done it. I'm just saying that you're using COM components so the code will be very similar to the VB6 equivalent.
-
Feb 6th, 2007, 10:20 PM
#5
Thread Starter
Hyperactive Member
Re: [02/03] Web Browser Control Problem
 Originally Posted by jmcilhinney
I thought you said that you'd already found some VB6 examples. I don't know of any specifically because I've never done it. I'm just saying that you're using COM components so the code will be very similar to the VB6 equivalent.
Ok. I know where this discussion is going.
Let's say I'll post Static's example of a Web Control Manipulation.
By the way thanks Static for the tutorial.
Code:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
AxWebBrowser1.Navigate("http://dci-intra")
End Sub
Private Sub AxWebBrowser1_DocumentComplete(ByVal sender As Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent) Handles AxWebBrowser1.DocumentComplete
If (sender Is AxWebBrowser1.Application) Then
Dim AHREF As Object
For Each AHREF In AxWebBrowser1.Document
Debug.Write(AHREF)
Next
End If
End Sub
Nothing is printed nor nothing has changed. Wonder why?
Rate Me! Rate Me! Rate Me!
Time to fly.
Copyright GraysonSoft Inc. 2007
-
Feb 6th, 2007, 11:44 PM
#6
Thread Starter
Hyperactive Member
Re: [02/03] Web Browser Control Problem
Rate Me! Rate Me! Rate Me!
Time to fly.
Copyright GraysonSoft Inc. 2007
-
Feb 7th, 2007, 01:16 AM
#7
Thread Starter
Hyperactive Member
Re: [02/03] Web Browser Control Problem
Rate Me! Rate Me! Rate Me!
Time to fly.
Copyright GraysonSoft Inc. 2007
-
Feb 7th, 2007, 01:26 AM
#8
Re: [02/03] Web Browser Control Problem
Have you debugged? Have you checked whether execution even enters that If block? I don't see how it could. The method is handling the DocumentComplete event of AxWebBrowser1, so the sender parameter refers to AxWebBrowser1. Your If statement is testing whether AxWebBrowser1 is the same object as AxWebBrowser1.Application, which I doubt is the case.
-
Feb 7th, 2007, 01:34 AM
#9
Thread Starter
Hyperactive Member
Re: [02/03] Web Browser Control Problem
 Originally Posted by jmcilhinney
Have you debugged? Have you checked whether execution even enters that If block? I don't see how it could. The method is handling the DocumentComplete event of AxWebBrowser1, so the sender parameter refers to AxWebBrowser1. Your If statement is testing whether AxWebBrowser1 is the same object as AxWebBrowser1.Application, which I doubt is the case.
So that what it does in the If Block.
No it does not enter the If Block. I will remove the If Block so that it will go directly to For Each Block. I will post the result shortly.
Yes I know I am such a noob at this.
The above statement was from Static's Web Browser Control that is made from Vb 6.0 that I have converted to Vb .NET.
Rate Me! Rate Me! Rate Me!
Time to fly.
Copyright GraysonSoft Inc. 2007
-
Feb 7th, 2007, 01:36 AM
#10
Thread Starter
Hyperactive Member
Re: [02/03] Web Browser Control Problem
Code:
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Load
AxWebBrowser1.Navigate("http://dci-intra")
End Sub
Private Sub AxWebBrowser1_DocumentComplete(ByVal sender As Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent) Handles AxWebBrowser1.DocumentComplete
Dim AHREF As Object
For Each AHREF In AxWebBrowser1.Document
Debug.Write(AHREF)
Next
End Sub
Now it does not enter in the For Each Block. Hmmm...
Wonder why?
Rate Me! Rate Me! Rate Me!
Time to fly.
Copyright GraysonSoft Inc. 2007
-
Feb 7th, 2007, 02:36 AM
#11
Thread Starter
Hyperactive Member
Re: [02/03] Web Browser Control Problem
Rate Me! Rate Me! Rate Me!
Time to fly.
Copyright GraysonSoft Inc. 2007
-
Feb 7th, 2007, 03:05 AM
#12
Thread Starter
Hyperactive Member
Re: [02/03] Web Browser Control Problem
Rate Me! Rate Me! Rate Me!
Time to fly.
Copyright GraysonSoft Inc. 2007
-
Feb 7th, 2007, 03:34 AM
#13
Thread Starter
Hyperactive Member
Re: [02/03] Web Browser Control Problem
Problem still not resolved?
Ok I will try other alternatives and post again sometime.
Rate Me! Rate Me! Rate Me!
Time to fly.
Copyright GraysonSoft Inc. 2007
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
|