📄 zhuce.frm
字号:
VERSION 5.00
Begin VB.Form frmZhuCe
BackColor = &H00FFC0C0&
Caption = "软件注册"
ClientHeight = 1560
ClientLeft = 60
ClientTop = 345
ClientWidth = 4005
LinkTopic = "Form1"
ScaleHeight = 1560
ScaleWidth = 4005
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "试用"
Height = 375
Left = 2160
TabIndex = 3
Top = 1080
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "注册"
Height = 375
Left = 600
TabIndex = 2
Top = 1080
Width = 1215
End
Begin VB.TextBox Text2
Height = 270
Left = 1080
TabIndex = 1
Top = 585
Width = 2655
End
Begin VB.TextBox Text1
Height = 270
Left = 1080
TabIndex = 0
Top = 225
Width = 2655
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "注册码:"
Height = 255
Left = 240
TabIndex = 5
Top = 600
Width = 735
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "注册给:"
Height = 255
Left = 240
TabIndex = 4
Top = 240
Width = 735
End
End
Attribute VB_Name = "frmZhuCe"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text2.Text = "frt_2004" Then
UpdateKey HKEY_LOCAL_MACHINE, "software\Company", "CompanyName", REG_SZ, Text1.Text, LenB(Text1.Text)
UpdateKey HKEY_LOCAL_MACHINE, "software\Company", "CompanyPass", REG_SZ, Text2.Text, 8
MsgBox "注册成功!欢迎使用正版软件!", vbOKOnly + vbInformation, "公司管理系统 V1.0"
frmLogin.Show
Unload Me
Else
MsgBox "注册码错误,请使用正版软件注册码!", vbOKOnly + vbExclamation, "公司管理系统 V1.0"
Text2.SetFocus
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
End If
End Sub
Private Sub Command2_Click()
'次数限制
RemainTimes = GetSetting("学校管理系统", "设置", "次数", 0)
If RemainTimes >= 100 Then
MsgBox "试用次数已满,请注册后才能使用!", , "学校管理系统"
End
Else
MsgBox "现在剩下:" & 100 - RemainTimes & "试用次数", , "学校管理系统"
RemainTimes = RemainTimes + 1
SaveSetting "学校管理系统", "设置", "次数", RemainTimes
End If
Unload Me
frmLogin.Show
End Sub
Private Sub Form_Load()
Dim jiancha As String
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
'检查是否注册
jiancha = GetKeyValue(HKEY_LOCAL_MACHINE, "software\Company", "CompanyPass")
If jiancha = "frt_2004" Then
Unload Me
frmLogin.Show
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -