⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 locking.frm

📁 包括注册号生成软件、LIB、DLL 加密模块 各种语言调用加密模块的例子程序等
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "欢迎试用加密软件  http://Zlocksoft.com"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command2 
      Caption         =   "运行"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1680
      TabIndex        =   1
      Top             =   1680
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "注册"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1680
      TabIndex        =   0
      Top             =   600
      Width           =   1215
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()           '程序一运行就判断是否注册

Dim I As Long
Dim lpBuffer As String * 10       '定义返回的字符串

 '调用判断是否注册函数,若返回值 Zhuce 为零说明注册成功
Zhuce = Testkey(30, lpBuffer, 0)    '可试用30天,试用期过后,若把系统时间改回来,可以运行

'Zhuce = Testkey(30, lpBuffer, 1)    '可试用30天,试用期过后,即使把系统时间改回来,也不能再运行

For I = 1 To 10
TestLock(I) = Asc(Mid(lpBuffer, I, 1))    '把返回的字符串转换为一数组供您程序中判断或使用,若注册成功其值为 10 11 12 13 14 15 16 17 18 19
Next

End Sub

Private Sub Command1_Click()

Dim I As Long
Dim lpBuffer As String * 10       '定义返回的字符串

Zhuce = Testkey(0, lpBuffer, 0)

For I = 1 To 10
TestLock(I) = Asc(Mid(lpBuffer, I, 1))    '把返回的字符串转换为一数组供您程序中判断或使用,若注册成功其值为 10 11 12 13 14 15 16 17 18 19
Next

If Zhuce = 0 Then MsgBox (" 软件已成功注册 ! ")


End Sub

Private Sub Command2_Click()    '您的程序

Dim I As Long
Dim Myint As Long

If Zhuce = -1 Then               '如果 Zhuce=-1 说明软件没注册,并且试用期已满软件不能运行
MsgBox "软件不能运行"             '应加上终止退出软件的命令
Else: MsgBox "软件可以运行"       'Zhuce=-2 说明软件虽没注册,但在试用期内,软件可以运行
End If                           '如果 Zhuce=0 说明软件已注册,软件可以运行

'
'             您的程序内容
'
'
'
'
If TestLock(3) = 12 Then                  '在您的软件中穿插判断数组值,以防软件被软解密
MsgBox "数组值正确,软件可以运行"          '最好把数组值作为您程序中的变量
Else: MsgBox "数组值不对,软件不能运行"
End If
'
'
If TestLock(6) = 15 Then                  '在您的软件中穿插判断数组值,以防软件被软解密
MsgBox "数组值正确,软件可以运行"          '最好把数组值作为您程序中的变量
Else: MsgBox "数组值不对,软件不能运行"
End If
'
'
If TestLock(9) = 18 Then                  '在您的软件中穿插判断数组值,以防软件被软解密
MsgBox "数组值正确,软件可以运行"          '最好把数组值作为您程序中的变量
Else: MsgBox "数组值不对,软件不能运行"
End If
'
'
'
'
'
'
Myint = TestLock(8) + 8      '假设 Myint 为您程序中的变量,其初值应为 25
'                            '把数组值 17 加上8,得 25 作为 Myint的 初值
'
'
'


End Sub


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -