学会调试
Dim n As Integer = GetConfigValue("Count",1)
msgbox(n)
Dim Code As String = GetConfigValue("Register" & ComputerId,"")
msgbox(Code)
Dim Ok As Boolean
If Code > "" AndAlso DecryptText(Code,"abc","abc") = ComputerId Then '如果注册码正确
OK = True
Else
'If n > 30 Then
If n > 5 Then
msgbox(1)
Forms("注册").Open()
Code = GetConfigValue("Register" & ComputerId,"")
msgbox(“Code=” & Code)
If Code > "" AndAlso DecryptText(Code,"abc","abc") = ComputerId Then '如果注册码正确
OK = True
End If
End If
'If n > 60 AndAlso Ok = False Then
If n > 10 AndAlso Ok = False Then
Messagebox.Show("您正在使用的产品已经超出试用次数!")
Syscmd.Project.Exit()
End If
End If
n = n + 1
SaveConfigValue("Count",n)
Forms("窗口1").open