Private Sub 注册_Click()
If Len(Trim(Me.txtRegKey)) = 0 Then
Msgbox "请输入注册码!", vbExclamation, "提示"
Me.txtRegKey.SetFocus
Exit Sub
End If
If Me.txtRegKey = UserCreateRegKey() Then
CurrentDb.Execute "DELETE FROM sys_RegInfo"
CurrentDb.Execute "INSERT INTO sys_RegInfo(RegKey) VALUES('" & Me.txtRegKey & "')"
Msgbox "现在您可以不受限制的使用本软件,感谢您的支持!", vbInformation, "注册成功"
Else
Msgbox "无效的注册码。", vbCritical, "注册失败"
End If
End Sub