📄 frmreg2.frm
字号:
VERSION 5.00
Object = "{90F3D7B3-92E7-44BA-B444-6A8E2A3BC375}#1.0#0"; "ACTSKIN4.OCX"
Object = "{F27AA50A-8600-11D1-AD8F-DB21EA843472}#6.1#0"; "ENCRYPT2.OCX"
Begin VB.Form FRMreg2
BorderStyle = 3 'Fixed Dialog
Caption = "软件未注册 "
ClientHeight = 2145
ClientLeft = 45
ClientTop = 435
ClientWidth = 3915
Icon = "FRMreg2.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2145
ScaleWidth = 3915
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "退 出"
Height = 465
Left = 2490
TabIndex = 5
Top = 1620
Visible = 0 'False
Width = 1275
End
Begin VB.TextBox Text1
Alignment = 2 'Center
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 285
Left = 1530
TabIndex = 3
Top = 180
Width = 2205
End
Begin VB.Frame Frame1
Caption = "请输入授权码:"
Height = 915
Left = 105
TabIndex = 1
Top = 600
Width = 3675
Begin VB.TextBox Text2
Alignment = 2 'Center
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 345
IMEMode = 3 'DISABLE
Left = 180
TabIndex = 2
Top = 330
Width = 3315
End
End
Begin VB.CommandButton Command1
Caption = "立即注册"
Height = 465
Left = 2490
TabIndex = 0
Top = 1620
Width = 1275
End
Begin ACTIVESKINLibCtl.Skin Skin1
Left = 1110
OleObjectBlob = "FRMreg2.frx":1D42
Top = 1590
End
Begin DevPowerEncrypt.EnCrypt EnCrypt1
Left = 6240
Top = 5880
_ExtentX = 847
_ExtentY = 847
End
Begin ACTIVESKINLibCtl.SkinLabel SkinLabel4
Height = 225
Index = 0
Left = 210
OleObjectBlob = "FRMreg2.frx":4C231
TabIndex = 4
Top = 180
Width = 1155
End
End
Attribute VB_Name = "FRMreg2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As Database
Dim rs As Recordset
Dim STR As String
Dim renhb As String
Private Sub Command1_Click()
On Error Resume Next
If Text2.Text = Mid$(EnCrypt1.EnCrypt(Crypt(StrReverse(Mid$(Text1, 2)), "65831")), 5) Then
Dim FILENO
FILENO = FreeFile()
Open App.Path & "\REG.dll" For Output As #FILENO
Print #FILENO, Text2
Close #FILENO
'注册成功写入REG.DLL文件中
MsgBox "注册成功!请重新启动程序", 32, "感谢您的支持"
Unload Me
Else
Unload Me
End If
End Sub
Private Sub Command2_Click()
On Error Resume Next
Unload Me
End Sub
Private Sub Form_Load()
On Error Resume Next
Text1.Text = GetSerialNumber("c:\")
' Skin1.LoadSkin App.Path & "\SKIN\7.sk"
Skin1.ApplySkin Me.hwnd
If Exists(App.Path & "\REG.dll") Then
Open App.Path & "\REG.dll" For Input As #1
renhb = StrConv(InputB$(LOF(1), 1), vbUnicode)
Close #1
If renhb = Mid$(EnCrypt1.EnCrypt(Crypt(StrReverse(Mid$(Text1, 2)), "65831")), 5) + Chr(13) + Chr(10) Then
Me.Caption = "软件已成功注册": Command1.Enabled = False: Text2.Text = "授权码已被确认": Command1.Caption = "已注册": Command2.Visible = True: Command1.Visible = False
End If
End If
End Sub
'If Text4.Text = Mid$(EnCrypt1.EnCrypt(Crypt(StrReverse(Mid$(Text3, 2)), "65831")), 5) Then
'
'MsgBox "YES"
'
'End If
Private Sub Frame1_DragDrop(Source As Control, x As Single, y As Single)
End Sub
'下面的代码可以关闭所有打开的 DAO workspace,并释放所占的内存。
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
MAIN.Enabled = True
Dim ws As Workspace
Dim db As Database
Dim rs As Recordset
For Each ws In Workspaces
For Each db In ws.Databases
For Each rs In db.Recordsets
rs.Close
Set rs = Nothing
Next
db.Close
Set db = Nothing
Next
ws.Close
Set ws = Nothing
Next
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -