📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Registration Key Generator"
ClientHeight = 6555
ClientLeft = 60
ClientTop = 510
ClientWidth = 7095
LinkTopic = "Form1"
ScaleHeight = 6555
ScaleWidth = 7095
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command4
Caption = "Quit"
Height = 375
Left = 5160
TabIndex = 10
Top = 6120
Width = 1815
End
Begin VB.Frame Frame2
Caption = "Generator"
Height = 4815
Left = 0
TabIndex = 6
Top = 0
Width = 7095
Begin VB.TextBox Text2
Height = 285
Left = 840
TabIndex = 12
Text = "200"
Top = 4320
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "Generate"
Height = 375
Left = 5040
TabIndex = 8
Top = 4320
Width = 1935
End
Begin VB.ListBox List1
Height = 3765
Left = 120
TabIndex = 7
Top = 480
Width = 6855
End
Begin VB.Label Label3
Caption = "keys"
Height = 255
Left = 2520
TabIndex = 13
Top = 4320
Width = 495
End
Begin VB.Label Label2
Caption = "Generate"
Height = 255
Left = 120
TabIndex = 11
Top = 4320
Width = 735
End
Begin VB.Label Label1
Caption = "Ready."
Height = 255
Left = 120
TabIndex = 9
Top = 240
Width = 6735
End
End
Begin VB.Frame Frame1
Caption = "Validator"
Height = 1095
Left = 0
TabIndex = 0
Top = 4920
Width = 7095
Begin VB.CommandButton Command3
Caption = "Validate"
Height = 375
Left = 5040
TabIndex = 5
Top = 480
Width = 1935
End
Begin VB.TextBox Text1
Height = 375
Index = 3
Left = 3840
TabIndex = 4
Top = 480
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 0
Left = 240
TabIndex = 3
Top = 480
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 1
Left = 1440
TabIndex = 2
Top = 480
Width = 1095
End
Begin VB.TextBox Text1
Height = 375
Index = 2
Left = 2640
TabIndex = 1
Top = 480
Width = 1095
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim RandomKeyClass As Class1
Private Sub Command1_Click()
Dim MaxKey As Long
MaxKey = Text2.Text
Set RandomKeyClass = New Class1
For i = 0 To MaxKey
Do
regc = RandomKeyClass.GetRegCode()
cFound = False
For i2 = 0 To List1.ListCount - 1
If List1.List(i2) = regc Then cFound = True
Next
DoEvents
Loop Until Not cFound
List1.AddItem regc
Label1.Caption = "Generating : " & List1.ListCount - 1
Next
End Sub
Private Sub Command3_Click()
MsgBox IIf(RandomKeyClass.ValidateRegCode(Text1(0).Text, Text1(1).Text, Text1(2).Text, Text1(3).Text), "The code is valid.", "The code is not valid.")
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub List1_Click()
Text1(0).Text = Mid(List1.List(List1.ListIndex), 1, 4)
Text1(1).Text = Mid(List1.List(List1.ListIndex), 6, 5)
Text1(2).Text = Mid(List1.List(List1.ListIndex), 12, 4)
Text1(3).Text = Mid(List1.List(List1.ListIndex), 17, 4)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -