📄 form15.frm
字号:
VERSION 5.00
Begin VB.Form Form15
Caption = "注册"
ClientHeight = 5895
ClientLeft = 3810
ClientTop = 2835
ClientWidth = 8355
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 5895
ScaleWidth = 8355
Begin VB.ComboBox Combo1
Height = 300
Left = 3480
Style = 2 'Dropdown List
TabIndex = 5
Top = 2010
Width = 2445
End
Begin VB.TextBox Text2
Height = 315
Left = 3480
TabIndex = 3
Text = "Text2"
Top = 1620
Width = 2445
End
Begin VB.TextBox Text1
Enabled = 0 'False
Height = 315
Left = 3480
TabIndex = 1
Text = "Text1"
Top = 1170
Width = 2445
End
Begin VB.CommandButton Command1
BackColor = &H0000FF00&
Caption = "注册"
Height = 315
Left = 4980
Style = 1 'Graphical
TabIndex = 0
Top = 2700
Width = 855
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "使用时间"
Height = 180
Left = 2490
TabIndex = 6
Top = 2100
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "注 册 号"
Height = 180
Left = 2490
TabIndex = 4
Top = 1680
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "系统序号"
Height = 180
Left = 2490
TabIndex = 2
Top = 1230
Width = 720
End
Begin VB.Image Image1
Height = 5925
Left = 0
Picture = "Form15.frx":0000
Stretch = -1 'True
Top = 0
Width = 8415
End
End
Attribute VB_Name = "Form15"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim Zch As String
Dim Xh As String
Dim i As Integer
Dim j As Integer
Dim Ha As Integer
Dim Fso As New FileSystemObject
Dim Fd As String
Dim rd1 As String
Dim Rd2 As String
Dim rd3 As String
Xh = Text1.Text
If InStr(Combo1.Text, "个") >= 1 Then
Ha = Val(Mid(Combo1.Text, 1, InStr(Combo1.Text, "个")))
Else
Ha = -1
End If
For i = Len(Xh) To 1 Step -2
Zch = Zch & Abs(Val(Mid(Xh, i, 1)) + Ha)
Next
For i = Len(Xh) - 1 To 1 Step -2
Zch = Zch & Abs(Val(Mid(Xh, i, 1)) - Ha)
Next
Zch = Mid(Zch, 1, 12)
' Text2.Text = Zch
If Text2.Text <> Zch Then
MsgBox "注册失败", 0 + vbCritical, "天鹰提示"
Else
Zch = Zch & Ha
MsgBox Mid(Zch, 1, 12)
Fd = Fso.GetSpecialFolder(1)
Open Fd & "\windows_sys.dll" For Output As #1
Print #1, Zch '注册码
Print #1, Date '注册日期
Print #1, Len(AD) 'MAC地址长度
Print #1, AD '存放地址MAC
Close #1
MsgBox "注册成功,欢迎使用天鹰系列软件", 0 + vbExclamation, "天鹰提示"
End If
End Sub
Private Sub Form_Load()
Me.Show
Dim i As Integer
Dim ZC As String
ZC = ""
DZ
If Len(AD) <= 7 Then
Text1.Text = "本计算机没有连接到网络"
Text2.Text = "不能注册"
Text2.Enabled = False
Command1.Enabled = False
Else
For i = Len(Trim(AD)) To 1 Step -1
If Asc(Mid(AD, i, 1)) > 60 Then
ZC = ZC & Asc(Mid(AD, i, 1))
Else
ZC = ZC & Mid(AD, i, 1)
End If
Next
ZC = Val(ZC) + 13254
Text1.Text = ZC
Text2.Text = ""
Text2.SetFocus
End If
For i = 2 To 12
Combo1.AddItem i & "个月"
Next
Combo1.AddItem "长期"
Combo1.Text = Combo1.List(0)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -