我做的小软件发布后在其它计算机上使用时GetConfigValue("Count",1)次数不会从新开始计算,下面是代码,请教老师
Dim n As Integer = GetConfigValue("Count",1)
Dim Code As String = GetConfigValue("Register" & ComputerId,"")
Dim Ok As Boolean
If Code > "" AndAlso DecryptText(Code,"qwer","qwer") = ComputerId Then '如果注册码正确
OK = True
Else
If n > 50 Then
Forms("注册").Open()
Code = GetConfigValue("Register" & ComputerId,"")
If Code > "" AndAlso DecryptText(Code,"qwer","qwer") = ComputerId Then '如果注册码正确
OK = True
End If
End If
If n > 60 AndAlso Ok = False Then
Messagebox.Show("已经超出试用次数!")
Syscmd.Project.Exit()
End If
End If
n = n + 1
SaveConfigValue("Count",n)