|
-
Jan 30th, 2010, 03:51 AM
#1
Thread Starter
Junior Member
Click into a iframe
Hi. how do i make vb.net webbrowser control click into a iframe.
i want it to click the banner on: http://1matrixclub.com/
-
Jan 30th, 2010, 04:01 AM
#2
Fanatic Member
Re: Click into a iframe
Hi, I just looked at the html doc for the page an found the iframe ref
Code:
<iframe width="728" height="90" allowtransparency="false" frameborder="0" hspace="0" vspace="0" marginheight="0" marginwidth="0" scrolling="no" src="http://www.promoteburner.com/code.php?id=2448&l=2" name="lolz"></iframe>
you could access this easy by using a webBrowser control
1/ navigate to the website (http://1matrixvlub.com)
2/ on Document Completed event get the pages html and parse it to find the src info within the iframe
3/ supply this src url into the webbrowser navigate event
If debugging is the process of removing bugs, then programming must be the process of putting them in.
-
Jan 30th, 2010, 04:05 AM
#3
Thread Starter
Junior Member
Re: Click into a iframe
 Originally Posted by Megalith
Hi, I just looked at the html doc for the page an found the iframe ref
Code:
<iframe width="728" height="90" allowtransparency="false" frameborder="0" hspace="0" vspace="0" marginheight="0" marginwidth="0" scrolling="no" src="http://www.promoteburner.com/code.php?id=2448&l=2" name="lolz"></iframe>
you could access this easy by using a webBrowser control
1/ navigate to the website ( http://1matrixvlub.com)
2/ on Document Completed event get the pages html and parse it to find the src info within the iframe
3/ supply this src url into the webbrowser navigate event
i am a little no0bish. sry. can uplease post code or something
-
Jan 30th, 2010, 04:37 AM
#4
Thread Starter
Junior Member
Re: Click into a iframe
buuuuuuuuuuuuuuuuuuuuuuump
-
Jan 30th, 2010, 04:45 AM
#5
Fanatic Member
Re: Click into a iframe
ok put a webbrowser on a form and try this
Code:
Public Class Form1
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
' this takes the first link on the page and navigatres to this page
' we put the if so that it doesn't do it once it reaches any page other than matrixclub.com
If WebBrowser1.Url.AbsoluteUri = "http://matrixclub.com/" Then
Dim link As String = WebBrowser1.Document.Links.Item(1).InnerText
WebBrowser1.Navigate(link)
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://matrixclub.com/")
End Sub
End Class
p.s. that site has now vanished lol
If debugging is the process of removing bugs, then programming must be the process of putting them in.
-
Jan 30th, 2010, 04:54 AM
#6
Thread Starter
Junior Member
Re: Click into a iframe
 Originally Posted by Megalith
ok put a webbrowser on a form and try this
Code:
Public Class Form1
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
' this takes the first link on the page and navigatres to this page
' we put the if so that it doesn't do it once it reaches any page other than matrixclub.com
If WebBrowser1.Url.AbsoluteUri = "http://matrixclub.com/" Then
Dim link As String = WebBrowser1.Document.Links.Item(1).InnerText
WebBrowser1.Navigate(link)
End If
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
WebBrowser1.Navigate("http://matrixclub.com/")
End Sub
End Class
p.s. that site has now vanished lol
Where do i put that code?
-
Jan 30th, 2010, 05:12 AM
#7
Fanatic Member
Re: Click into a iframe
replace the entire code for the form with it
If debugging is the process of removing bugs, then programming must be the process of putting them in.
-
Jan 30th, 2010, 12:42 PM
#8
Thread Starter
Junior Member
Re: Click into a iframe
 Originally Posted by Megalith
replace the entire code for the form with it
the code doesn't work. This just copy "Ad by PromoteBurner.com" and then navigate it
-
Jan 30th, 2010, 01:29 PM
#9
Thread Starter
Junior Member
Re: Click into a iframe
-BUUUUUUUUUUMP-
Still looking please
-
Feb 1st, 2010, 08:15 AM
#10
Fanatic Member
Re: Click into a iframe
 Originally Posted by napzter13
the code doesn't work. This just copy "Ad by PromoteBurner.com" and then navigate it
the site went down while i wrote that code, you need to change the link index a bit possibly, however the site doesn't exist now. (domain has expired).
If debugging is the process of removing bugs, then programming must be the process of putting them in.
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
|