Guys i am making a traffic exchange viewer(Bot) for my own traffic exchange : http://skillerzforum.com/exchange/
I have used normal default IE browser before and now i just copied the same code with gecko and i had some problems, Which i need some help.
Here is the code :
Here's a simple explanation what's the code does :
*When the application loads it goes to our traffic exchange homepage. After logging in and clicking surf button they navigate to surf page(Where users website opens in pop-ups).
*Here's PROBLEM 1 :
I have used the above code for preventing geckowebbrowser opening new window(Which is the same code for cancelling opening of internet explorer for pop-ups in default webbrowser) Which was not worked, I need help with this.
*And after preventing gecko browser from opening new windows, It uses the below code to copy the url of users website in the traffic exchange list by using document.text(Viewing page source).
Here's my problem no.2 Geckobrowser don't support the command documentText, So i need an alternative which should work as like it for gecko.
And please guys i need help on the above two problems. Thanks.
I have used normal default IE browser before and now i just copied the same code with gecko and i had some problems, Which i need some help.
Here is the code :
Code:
Public Class Form1
Dim step1 As Boolean = False
Dim link As String = ""
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
GeckoWebBrowser1.Navigate("http://skillerzforum.com/exchange/")
End Sub
Private Sub geckoWebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
e.Cancel = True
End Sub
Private Sub Surf_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Surf.Click
GeckoWebBrowser1.Navigate("http://skillerzforum.com/exchange/surf.php")
GeckoWebBrowser2.Visible = True
End Sub
Private Sub geckoWebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles GeckoWebBrowser1.DocumentCompleted
If step1 = True Then
step1 = False
Call getlink()
End If
End Sub
Public Sub getlink()
Dim str As String = GeckoWebBrowser1.DocumentText
Dim spl = Split(str, Label1.Text)
Dim sp = Split(spl(1), """")
link = sp(0)
step1 = True
GeckoWebBrowser2.Navigate(sp(0))
End Sub
Private Sub geckoWebBrowser2_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
e.Cancel = True
End Sub
End Class
*When the application loads it goes to our traffic exchange homepage. After logging in and clicking surf button they navigate to surf page(Where users website opens in pop-ups).
*Here's PROBLEM 1 :
Code:
Private Sub geckoWebBrowser1_NewWindow(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)
e.Cancel = True
End Sub
*And after preventing gecko browser from opening new windows, It uses the below code to copy the url of users website in the traffic exchange list by using document.text(Viewing page source).
Code:
Public Sub getlink()
Dim str As String = GeckoWebBrowser1.DocumentText
Dim spl = Split(str, Label1.Text)
Dim sp = Split(spl(1), """")
link = sp(0)
step1 = True
GeckoWebBrowser2.Navigate(sp(0))
End Sub
And please guys i need help on the above two problems. Thanks.