⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 reg.frm

📁 汽修厂管理软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Reg 
   Caption         =   "软件注册"
   ClientHeight    =   2850
   ClientLeft      =   6105
   ClientTop       =   3615
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   2850
   ScaleWidth      =   4680
   Begin VB.CommandButton Cmd_Cancel 
      Caption         =   "以后再说"
      Height          =   375
      Left            =   2280
      TabIndex        =   5
      Top             =   1800
      Width           =   1575
   End
   Begin VB.CommandButton Cmd_Reg 
      Caption         =   "现在注册"
      Height          =   375
      Left            =   360
      TabIndex        =   4
      Top             =   1800
      Width           =   1455
   End
   Begin VB.TextBox Txt_Series 
      Appearance      =   0  'Flat
      Height          =   270
      Left            =   1680
      TabIndex        =   3
      Top             =   1080
      Width           =   2415
   End
   Begin VB.TextBox Txt_PcCode 
      Appearance      =   0  'Flat
      ForeColor       =   &H000000FF&
      Height          =   270
      Left            =   1680
      Locked          =   -1  'True
      TabIndex        =   1
      Top             =   480
      Width           =   2415
   End
   Begin VB.Label Label2 
      Caption         =   "注册码:"
      Height          =   255
      Left            =   720
      TabIndex        =   2
      Top             =   1080
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "您的机器代码:"
      Height          =   255
      Left            =   360
      TabIndex        =   0
      Top             =   480
      Width           =   1335
   End
End
Attribute VB_Name = "Reg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Cmd_Cancel_Click()
Unload Me
End Sub

Private Sub Cmd_Reg_Click()
Dim nKeyHandle As Long, nValueType As Long, nLength As Long
   Dim sValue As String
 Dim myEnc As dsEncrypt


'判断注册码是否正确!

  Set myEnc = New dsEncrypt
   myEnc.KeyString = "Hussar"

     
 
 If Txt_Series.Text = myEnc.Encrypt(Txt_PcCode.Text) Then
       '如果正确写入注册表
       Call RegCreateKey(HKEY_LOCAL_MACHINE, "SoftWare\HussarWorkRoom", nKeyHandle)
       nLength = Len(Txt_Series.Text)
       Call RegSetValueEx(nKeyHandle, "SeriesNum", 0, REG_SZ, Txt_Series.Text, 255)
       MsgBox "您已经成功注册,请重新启动软件!", vbInformation, STRGARAGE
     Else
       MsgBox "您没有填入合法序列号", vbInformation, STRGARAGE
    End If
Unload Me
End Sub

Private Sub Form_Load()
'获取硬盘序列好
 Txt_PcCode.Text = GetDriveInfo("C:\", GETDI_SERIAL)  ' HD Serial Number

End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -