Foxtable(狐表)用户栏目专家坐堂 → 注册机制问题


  共有2319人关注过本帖平板打印复制链接

主题:注册机制问题

帅哥哟,离线,有人找我吗?
tuohai
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:幼狐 帖子:124 积分:1325 威望:0 精华:0 注册:2016/11/16 14:21:00
注册机制问题  发帖心情 Post By:2019/4/15 10:23:00 [只看该作者]

每次启动都会启动 注册窗口,请老师指导。


Dim n As Integer = Registry.GetValue("HKEY_CURRENT_USER\Software\MyApp","Count",1)
Dim Code As String =Registry.GetValue("HKEY_CURRENT_USER\Software\MyApp","Register" & ComputerId,"")
Dim Ok As Boolean

If Code > ""  Then '如果注册码正确
    Dim str As String = DecryptText(Code,"abcd","abc")    <<<<=====这里可以自己定义还是只能用ABC
    Dim ary() As String = str.Split(",")
    If ary.length = 2 AndAlso ary(1) >= Date.Now AndAlso ary(0) = ComputerId Then
        OK = True
    End If
End If
If ok = False Then
    If n > 5 Then
        Forms("注册码").Open()
        Code = Registry.GetValue("HKEY_CURRENT_USER\Software\MyApp","Register" & ComputerId,"")
        If Code > "" AndAlso DecryptText(Code,"abcd","abc") = ComputerId Then '如果注册码正确
            OK = True
        End If
    End If
    If n > 20 AndAlso Ok = False Then
        Messagebox.Show("您正在使用的产品已经超出试用次数!")
        Syscmd.Project.Exit()
    End If
End If
Registry.SetValue("HKEY_CURRENT_USER\Software\MyApp","count",n + 1)

 回到顶部