May 8, 2015 03:44 AM
(This post was last modified: May 8, 2015 03:46 AM by titanbullet.)
Hello again 🤝 Today I am releasing my little ad system for vb.net applications, as a "thank you" to everyone who helped me in my previous thread (this one)
Drop a Picturebox, a timer and a progress bar, import system.Net and type Dim count as integer = 1 below public class Form1 at the top of your form.
I left the links as-is so that you can test it easily.Be sure to edit them out!
This system cycles through 3 png, that are uploaded to your own server so you can change them without the need to update the whole program. Save for the links, but those are placed in your dropbox.
Also keep in mind, this system will be used at my soon-to-be-released program LeagueHelper (http://voidblaze.esy.es/leaguehelper)
If someone wants to buy the above program's whole source at a discount before i release it, then please PM me :)
Drop a Picturebox, a timer and a progress bar, import system.Net and type Dim count as integer = 1 below public class Form1 at the top of your form.
Code
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
Dim wb As New WebClient
If adbar.Value = adbar.Maximum Then
If Count = 3 Then
If My.Computer.FileSystem.FileExists(My.Computer.FileSystem.SpecialDirectories.Temp + "\Leaguehelper\ad3.png") Then
PictureBox1.Load(My.Computer.FileSystem.SpecialDirectories.Temp + "\Leaguehelper\ad3.png")
Else
PictureBox1.Load("http://voidblaze.esy.es/leaguehelper/ads/pics/ad3.png")
PictureBox1.Refresh()
wb.DownloadFileAsync(New Uri("http://voidblaze.esy.es/leaguehelper/ads/pics/ad3.png"), My.Computer.FileSystem.SpecialDirectories.Temp + "\Leaguehelper\ad3.png")
End If
adbar.Value = 0
Count = 4
End If
If Count = 2 Then
If My.Computer.FileSystem.FileExists(My.Computer.FileSystem.SpecialDirectories.Temp + "\Leaguehelper\ad3.png") Then
PictureBox1.Load(My.Computer.FileSystem.SpecialDirectories.Temp + "\Leaguehelper\ad2.png")
Else
PictureBox1.Load("http://voidblaze.esy.es/leaguehelper/ads/pics/ad2.png")
PictureBox1.Refresh()
wb.DownloadFileAsync(New Uri("http://voidblaze.esy.es/leaguehelper/ads/pics/ad2.png"), My.Computer.FileSystem.SpecialDirectories.Temp + "\Leaguehelper\ad2.png")
End If
adbar.Value = 0
Count = 3
End If
If Count = 1 Then
If My.Computer.FileSystem.FileExists(My.Computer.FileSystem.SpecialDirectories.Temp + "\Leaguehelper\ad3.png") Then
PictureBox1.Load(My.Computer.FileSystem.SpecialDirectories.Temp + "\Leaguehelper\ad1.png")
Else
PictureBox1.Load("http://voidblaze.esy.es/leaguehelper/ads/pics/ad1.png")
PictureBox1.Refresh()
wb.DownloadFileAsync(New Uri("http://voidblaze.esy.es/leaguehelper/ads/pics/ad1.png"), My.Computer.FileSystem.SpecialDirectories.Temp + "\Leaguehelper\ad1.png")
End If
adbar.Value = 0
Count = 2
End If
If Count = 4 Then
adbar.Value = 0
Count = 1
End If
Else
adbar.Value = adbar.Value + 1
End If
End Sub
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
Dim client As WebClient = New WebClient()
If Count = 3 Then
Dim reply As String = client.DownloadString("https://www.dropbox.com/s/h7w2b5pg4vgedxl/adlink1.txt?dl=1")
Process.Start(reply)
End If
If Count = 2 Then
Dim reply As String = client.DownloadString("https://www.dropbox.com/s/l0u45unev5gco0i/adlink2.txt?dl=1")
Process.Start(reply)
End If
If Count = 1 Then
Dim reply As String = client.DownloadString("https://www.dropbox.com/s/fv87pqpbmigly0c/adlink3.txt?dl=1")
Process.Start(reply)
End If
End SubI left the links as-is so that you can test it easily.Be sure to edit them out!
This system cycles through 3 png, that are uploaded to your own server so you can change them without the need to update the whole program. Save for the links, but those are placed in your dropbox.
Also keep in mind, this system will be used at my soon-to-be-released program LeagueHelper (http://voidblaze.esy.es/leaguehelper)
If someone wants to buy the above program's whole source at a discount before i release it, then please PM me :)


