frmreg.frm
来自「非常漂亮的VB控件」· FRM 代码 · 共 84 行
FRM
84 行
VERSION 5.00
Begin VB.Form FrmReg
BorderStyle = 0 'None
Caption = "注册"
ClientHeight = 1065
ClientLeft = 2715
ClientTop = 3315
ClientWidth = 5175
Icon = "FrmReg.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1065
ScaleWidth = 5175
ShowInTaskbar = 0 'False
Begin VB.TextBox Tsn
Height = 270
Left = 840
TabIndex = 4
Top = 600
Width = 2775
End
Begin VB.TextBox Tid
Height = 270
Left = 840
TabIndex = 2
Top = 120
Width = 2775
End
Begin VB.CommandButton CancelButton
Caption = "怎样注册"
Height = 375
Left = 3840
TabIndex = 1
Top = 600
Width = 1215
End
Begin VB.CommandButton OKButton
Caption = "注册(&R)"
Height = 375
Left = 3840
TabIndex = 0
Top = 120
Width = 1215
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "注册号:"
Height = 180
Left = 120
TabIndex = 5
Top = 600
Width = 720
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "机器ID:"
Height = 180
Left = 120
TabIndex = 3
Top = 210
Width = 720
End
End
Attribute VB_Name = "FrmReg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub OKButton_Click()
CreateNewKey HKEY_LOCAL_MACHINE, "SOFTWARE\华盛软件工作室\NiceForm"
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\华盛软件工作室\NiceForm", "ID", Tid.Text, vbCFText
SetKeyValue HKEY_LOCAL_MACHINE, "SOFTWARE\华盛软件工作室\NiceForm", "SN", Tsn.Text, vbCFText
If Tsn.Text = Trim(Str(Int(Tid.Text * 1.5))) + "-" + Trim(Str(Int(Tid.Text / 0.5))) + "-" + Trim(Str(Int(Tid.Text * 1.111))) + "-" + Trim(Str(Int(Tid.Text / 0.2))) Then
MsgBox "注册成功!谢谢您的注册!"
Else
MsgBox "注册号不正确,请检查!"
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?