老师,您好!
以下代码是帮助文件中的按试用次数加密,我想改为按试用天数加密,且写入系统注册表,请老师指点该如何修改?谢谢!
'超过试用次数注册
Dim n As Integer = GetConfigValue("Count",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 n > 50 Then
Messagebox.Show("您已经试用" & n & "次!总试用次数为88次!为了不影响您正常使用,请尽完成注册!")
Forms("注册").Open()
Code = GetConfigValue("Register" & ComputerId,"")
If Code > "" AndAlso DecryptText(Code,"abc","abc") = ComputerId Then '如果注册码正确
OK = True
End If
End If
If n > 8 AndAlso Ok = False Then
Messagebox.Show("您正在使用的产品已经超出试用次数!")
Syscmd.Project.Exit()
End If
End If
n = n + 1
SaveConfigValue("Count",n)