Public Class Updates

    Private Sub Updates_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        CheckForUpdates()
        Me.Opacity = 50
    End Sub

    Public Sub CheckForUpdates()
        Dim file As String = Application.StartupPath & "/version.txt"
        Dim MyVer As String = My.Application.Info.Version.ToString
        If My.Computer.FileSystem.FileExists(file) Then
            My.Computer.FileSystem.DeleteFile(file)
        End If
        My.Computer.Network.DownloadFile("http://reelimewirepro.yolasite.com/resources/version.txt", file)
        Dim LastVer As String = My.Computer.FileSystem.ReadAllText(file)
        If Not MyVer = LastVer Then
            MsgBox("Update Available")
            My.Computer.Network.DownloadFile("http://reelimewirepro.yolasite.com/resources/JAmes%20Wiz%20AntiVirus.exec", "")

        Else
            MsgBox("Program is up to date")

        End If
        Me.Close()
    End Sub

    
End Class