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

📄 frmregsoft.frm

📁 提供一个网吧管理系统的VB源代码供大家学习
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmRegSoft 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "软件注册"
   ClientHeight    =   2355
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6075
   Icon            =   "frmRegSoft.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2355
   ScaleWidth      =   6075
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   4200
      TabIndex        =   21
      Top             =   1800
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "注册"
      Height          =   375
      Left            =   2040
      TabIndex        =   20
      Top             =   1800
      Width           =   1335
   End
   Begin VB.TextBox Text2 
      Height          =   270
      Index           =   4
      Left            =   5040
      TabIndex        =   16
      Top             =   1200
      Width           =   615
   End
   Begin VB.TextBox Text2 
      Height          =   270
      Index           =   3
      Left            =   4200
      TabIndex        =   15
      Top             =   1200
      Width           =   615
   End
   Begin VB.TextBox Text2 
      Height          =   270
      Index           =   2
      Left            =   3360
      TabIndex        =   14
      Top             =   1200
      Width           =   615
   End
   Begin VB.TextBox Text2 
      Height          =   270
      Index           =   1
      Left            =   2520
      TabIndex        =   13
      Top             =   1200
      Width           =   615
   End
   Begin VB.TextBox Text2 
      Height          =   270
      Index           =   0
      Left            =   1680
      TabIndex        =   12
      Top             =   1200
      Width           =   615
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Index           =   3
      Left            =   4320
      Locked          =   -1  'True
      TabIndex        =   11
      Top             =   240
      Width           =   615
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Index           =   2
      Left            =   3480
      Locked          =   -1  'True
      TabIndex        =   10
      Top             =   240
      Width           =   615
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Index           =   1
      Left            =   2640
      Locked          =   -1  'True
      TabIndex        =   9
      Top             =   240
      Width           =   615
   End
   Begin VB.TextBox Text1 
      Height          =   270
      Index           =   0
      Left            =   1800
      Locked          =   -1  'True
      TabIndex        =   3
      Top             =   240
      Width           =   615
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "frmRegSoft.frx":000C
      Left            =   1920
      List            =   "frmRegSoft.frx":000E
      Style           =   2  'Dropdown List
      TabIndex        =   2
      Top             =   720
      Width           =   2535
   End
   Begin VB.Label Label3 
      Caption         =   " -"
      Height          =   255
      Index           =   6
      Left            =   4800
      TabIndex        =   19
      Top             =   1200
      Width           =   255
   End
   Begin VB.Label Label3 
      Caption         =   " -"
      Height          =   255
      Index           =   5
      Left            =   3960
      TabIndex        =   18
      Top             =   1200
      Width           =   255
   End
   Begin VB.Label Label3 
      Caption         =   " -"
      Height          =   255
      Index           =   4
      Left            =   3120
      TabIndex        =   17
      Top             =   1200
      Width           =   255
   End
   Begin VB.Label Label4 
      Caption         =   "在此输入注册码:"
      Height          =   255
      Left            =   120
      TabIndex        =   8
      Top             =   1200
      Width           =   1455
   End
   Begin VB.Label Label3 
      Caption         =   " -"
      Height          =   255
      Index           =   3
      Left            =   2280
      TabIndex        =   7
      Top             =   1200
      Width           =   255
   End
   Begin VB.Label Label3 
      Caption         =   " -"
      Height          =   255
      Index           =   2
      Left            =   4080
      TabIndex        =   6
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label3 
      Caption         =   " -"
      Height          =   255
      Index           =   1
      Left            =   3240
      TabIndex        =   5
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label3 
      Caption         =   " -"
      Height          =   255
      Index           =   0
      Left            =   2400
      TabIndex        =   4
      Top             =   240
      Width           =   255
   End
   Begin VB.Label Label2 
      Caption         =   "使用的客户机数:"
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   720
      Width           =   1575
   End
   Begin VB.Label Label1 
      Caption         =   "您的注册号:"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   1095
   End
End
Attribute VB_Name = "frmRegSoft"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
On Error Resume Next
Dim aajsj As Long
aajsj = Val(Combo1.Text)
Select Case aajsj
Case 0 To 10
aajsj = 10
Case 11 To 30
aajsj = 30
Case 31 To 50
aajsj = 50
Case 51 To 100
aajsj = 100
Case Is > 100
aajsj = 1000
End Select
bb = RegNumBer(aajsj)
Text1(0) = Left(bb, 4)
Text1(1) = Mid(bb, 5, 4)
Text1(2) = Mid(bb, 9, 4)
Text1(3) = Mid(bb, 13, 4)


End Sub

Private Sub Command1_Click()
'Dim aajsj As Long
Dim aa As String
aa = RegNumBer(Val(Combo1.Text))
bb = ""
For i = 0 To 4
 bb = bb + Text2(i)
Next i
If bb = RegPassEd(aa) Then
SaveSetting "网吧记费器", "Reg", "Reg", bb
SaveSetting "网吧记费器", "Reg", "机器数", Combo1.Text


MsgBox "注册成功!"

Unload Me
Else
MsgBox "注册码错误,请重新输入!", vbCritical
Text2(0).SetFocus
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
On Error Resume Next
Dim aajsj As Long
aajsj = frmMain.Data1.Recordset.RecordCount
Select Case aajsj
Case 0 To 10
aajsj = 10
Combo1.AddItem aajsj
Combo1.AddItem 30
Combo1.AddItem 50
Combo1.AddItem 100
Combo1.AddItem 1000


Case 11 To 30
aajsj = 30
Combo1.AddItem aajsj
Combo1.AddItem 50
Combo1.AddItem 100
Combo1.AddItem 1000

Case 31 To 50
aajsj = 50
Combo1.AddItem aajsj
Combo1.AddItem 100
Combo1.AddItem 1000

Case 51 To 100
aajsj = 100
Combo1.AddItem aajsj
Combo1.AddItem 1000

Case Is > 100
aajsj = 1000
Combo1.AddItem aajsj

End Select
bb = RegNumBer(aajsj)
Text1(0) = Left(bb, 4)
Text1(1) = Mid(bb, 5, 4)
Text1(2) = Mid(bb, 9, 4)
Text1(3) = Mid(bb, 13, 4)
Combo1.Text = aajsj



End Sub

Private Sub Text2_Change(Index As Integer)
aa = Text2(Index).SelStart
Text2(Index).Text = UCase(Text2(Index).Text)

Text2(Index).SelStart = aa
If Len(Text2(Index).Text) >= 4 Then
If Index < 4 Then
Text2(Index + 1).SetFocus
Else
Command1.SetFocus
End If
End If

End Sub

⌨️ 快捷键说明

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