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

📄 frm_regedit.frm

📁 ktv场所的包房开房、迎宾、预定管理系统。
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm_regedit 
   Caption         =   "注册信息"
   ClientHeight    =   3195
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "试用"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Left            =   2790
      TabIndex        =   7
      Top             =   2460
      Width           =   1185
   End
   Begin VB.CommandButton Command1 
      Caption         =   "注册"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Left            =   645
      TabIndex        =   2
      Top             =   2460
      Width           =   1185
   End
   Begin VB.TextBox txt_name 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   390
      Left            =   1845
      TabIndex        =   0
      Text            =   "Text1"
      Top             =   1320
      Width           =   2355
   End
   Begin VB.TextBox txt_sn 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   390
      Left            =   1830
      TabIndex        =   1
      Text            =   "Text1"
      Top             =   1845
      Width           =   2355
   End
   Begin VB.Label Label4 
      Caption         =   "用户名称:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      Left            =   510
      TabIndex        =   6
      Top             =   1365
      Width           =   1260
   End
   Begin VB.Label lab_sn 
      Appearance      =   0  'Flat
      BackColor       =   &H80000011&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   405
      Left            =   1860
      TabIndex        =   5
      Top             =   705
      Width           =   2325
   End
   Begin VB.Line Line1 
      BorderWidth     =   2
      DrawMode        =   9  'Not Mask Pen
      X1              =   15
      X2              =   4680
      Y1              =   1230
      Y2              =   1230
   End
   Begin VB.Label Label2 
      Caption         =   "用户注册号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      Left            =   270
      TabIndex        =   4
      Top             =   1905
      Width           =   1440
   End
   Begin VB.Label Label1 
      Caption         =   "产品序列号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      Left            =   375
      TabIndex        =   3
      Top             =   720
      Width           =   1440
   End
End
Attribute VB_Name = "frm_regedit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim sn_num As Double
Dim sn_len As Integer
Dim snstring As String
Private Sub Command1_Click()
    Dim strsql As String
    Dim msgtext As String
    Dim mrc1 As ADODB.Recordset
    Dim disksn As String
    Dim sn_len, sn_num, i, total_a1, total_a, j, total_a2 As Integer
    Dim a As String
    Dim snstring, g_username, cccc As String
    
    
    strsql = "select * from userinfo "
    Set mrc1 = ExecuteSQL(strsql, msgtext)


    disksn = "qdsoft2004LH"
    sn_len = Len(disksn)
    If sn_len > 10 Then
        sn_len = 10
    End If
    snstring = Mid(disksn, 1, 1)
    sn_num = Asc(snstring)
    For i = 1 To sn_len
        sn_num = sn_num + Asc(Mid(disksn, i, 1)) * 157
    Next i
    g_username = Trim$(txt_name)
    i = LenB(Trim$(StrConv(g_username, vbUnicode)))
    i = Len(g_username)
    total_a = 0
    For j = 1 To i
        total_a1 = 0
        total_a2 = 0
        a = Hex(Asc(Mid(g_username, j, 1)))
        If Len(a) > 2 Then
            cccc = Mid(a, 1, 2)
            total_a1 = "&H" & cccc
            cccc = Mid(a, 3, 2)
            total_a2 = "&H" & cccc
            a = 0
        Else
            cccc = a
            total_a1 = "&H" & cccc
        End If
        total_a = total_a + total_a2 + total_a1
    Next j
    sn_num = sn_num + total_a

    snstring = sn_num
    If Val(txt_sn.text) = sn_num And txt_name <> "" Then
        MsgBox "注册成功!", vbOKOnly, "谢谢使用!"
        regedita = True
        strsql = "select * from  userinfo "
        Set mrc1 = ExecuteSQL(strsql, msgtext)
        mrc1.AddNew
        mrc1!userid = snstring
        mrc1!UserName = txt_name
        mrc1.Update
        mrc1.Close
        Unload Me
    End If
End Sub

Private Sub Command2_Click()
    regedita = False
    Unload Me
End Sub

Private Sub Form_Load()
Dim disksn1 As String
Dim disksn2 As String
Dim sn_len As Integer

    txt_sn.text = ""
    txt_name.text = ""
End Sub

⌨️ 快捷键说明

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