Advertisement
Guest User

Untitled

a guest
Dec 10th, 2016
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VB.NET 1.32 KB | None | 0 0
  1.     Public Sub CheckForUpdates()
  2.  
  3.         'https://www.dropbox.com/s/xxxxxxxxxxxx/version.txt?dl=0 'CHANGE ?dl=0 to ?dl=1
  4.         Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create("https://www.dropbox.com/s/xxxxxxx/name.rar?dl=1")
  5.         Dim response As System.Net.HttpWebResponse = request.GetResponse()
  6.  
  7.         Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
  8.  
  9.         Dim newestversion As String = sr.ReadToEnd()
  10.         Dim currentversion As String = Application.ProductVersion
  11.  
  12.         If newestversion.Contains(currentversion) Then
  13.             Me.TopMost = True
  14.             MsgBox("NickTai Chat Spam is up to date.")
  15.  
  16.         Else
  17.  
  18.             Me.TopMost = True
  19.             MsgBox("There is a new update, it will begin to download.")
  20.  
  21.             'https://www.dropbox.com/s/xxxxxxxxxxxx/name.rar?dl=0 'CHANGE ?dl=0 to ?dl=1
  22.             System.Diagnostics.Process.Start("https://www.dropbox.com/s/xxxxxxxxxxx/name.rar?dl=1")
  23.         End If
  24.     End Sub
  25.  
  26.     Private Sub Form1_loading(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
  27.         CheckForUpdates()
  28.         Label20.Hide()
  29.     End Sub
  30.  
  31.     Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  32.         Me.TopMost = True
  33.     End Sub
  34. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement