Tạo một 1 Form Trong Form thêm Webbrowser
Public Class Form1
Dim id As String = "3246570"
'How to find your adfly ID:
'1. Log in on adfly
'2. Go to https://adf.ly/publisher/tools#tools-easy
'3. Search for a box with a link that looks somehting like this: http://adf.ly/4909356/www.google.com
'4. The number is your id
Dim newForm As Boolean = True
'Set this to true if you want to show a new form when the user skips the ad.
'Set this to false if it should stay on the same form and hide the webBrowser.
'When this is set to true, change the shutdown mode in the properties of you project. (under application)
'/socks.uberalbus.com/adflyLock.html
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
Dim link As String = "http://adf.ly/" & id & "/ads.blogsviet.net/adfly-activecode.html"
WebBrowser1.Location = New Point(0, 0)
WebBrowser1.Dock = DockStyle.Fill
WebBrowser1.ScriptErrorsSuppressed = True
WebBrowser1.Navigate(link)
End Sub
Private Sub WebBrowser1_DocumentCompleted(ByVal sender As Object, ByVal e As WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted
If WebBrowser1.DocumentText = "true" Then
If newForm = True Then
form2.show()
Me.Close()
Else
WebBrowser1.Visible = False
End If
End If
End Sub
End Class
Thay thế đoạn code ID màu đỏ bằng với ID của tài khoản ADF.ly của bạn
Thay thế đoạn link web trong blog bằng link web của bạn
Chúc các bạn thành công.