你想做一个升级提示?要这样写
try
Dim hc As New HttpClient(UpdatePath & "/update.txt") 'http://foxtable.com/download/80222/update.txt
Dim str As String = hc.GetData()
Dim ud() As String = str.Split("|") '获取文件内容
Dim Sdate1 As Date = Cdate(ud(0)) '服务器update.txt发布日期
Dim Sdate2 As Date = Cdate(ud(1)) '服务器Version.txt发布日期
Dim Cdate1 As Date = PublishDate '客户端发布日期
Dim Cdate2 As Date = FileSys.ReadAllText(ProjectPath & "\Bin\Version.txt") '客户端Version.txt发布日期
If Sdate2 > Cdate2 OrElse Sdate1 > Cdate1 Then
msgbox("有新版本")
'静默升级代码 Syscmd.Project.Update(False,False)
End If
catch ex As exception
msgbox(ex.message)
msgbox("下载失败")
End try