我在注册机中
计算注册码的代码为:
Dim CmpCode As
WinForm.TextBox
= e.Form.Controls("机器码")
Dim CalCode As
WinForm.TextBox
= e.Form.Controls("注册码")
Calcode.text = EncryptText(cmpcode.text,"pao","pao")
我在注册窗口中:
获取机器码的代码为:
Dim CMPCODE As
WinForm.TextBox
= e.Form.Controls("机器码")
CMPCODE.Text = ComputerId
”注册“”按钮的代码
Dim CmpCode As WinForm.TextBox = e.Form.Controls("机器码")
Dim RegCode As WinForm.TextBox = e.Form.Controls("注册码")
If cmpcode.text <> DecryptText(regcode.text,"pao","pao")
Then '若注册码不正确
msgbox("当前的注册码无效,请与开发者联系")
Else
msgbox("感谢您的注册!")
SaveConfigValue("注册状态"& ComputerId,True) '若注册成功则保存设置,并关闭窗体
e.Form.close
我在点击“注册”时显示为:不正确的数据,不知什么原因,请指教!谢谢!