你好,请问下面这段实现注册的代码,不知道为什么时间没到就老弹出了窗口提示注册,不知道为什么,分机用开发版发布的项目出现问题。
web.Refresh
Dim data As String = web.Document.Body.InnerText ' 日期对比
' Dim Count5 As Integer '将数据写入到注册表中
' Count5 = Registry.GetValue("HKEY_CURRENT_USER\Software\MyApp","Count5",0)
' Registry.SetValue("HKEY_CURRENT_USER\Software\MyApp","Count5",Count5 + 1) '注册表
' Dim a As Integer = GetConfigValue("Count1",1)
Dim Code As String = GetConfigValue("Register" & ComputerId,"")
Dim Ok As Boolean
If Code > "" AndAlso DecryptText(Code,"abc","abc") = ComputerId Then '如果注册码正确
OK = True
Else
If data>"2016-06-30" Then '
Forms("注册").Open()
Code = GetConfigValue("Register" & ComputerId,"")
If Code > "" AndAlso DecryptText(Code,"abc","abc") = ComputerId Then '如果注册码正确
OK = True
End If
End If
If data>"2016-06-30" AndAlso Ok = False Then
Messagebox.Show("您正在使用的产品已经超期!")
Syscmd.Project.Exit()
End If
End If