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

📄 frmregister.frm

📁 这是一个利用VB编写的中小企业ERP。功能比较全
💻 FRM
字号:
Version 5.00
Begin VB.Form FrmRegister
    BorderStyle = 1 'Fixed Single
    Caption = "用户注册"
    ClientHeight = 2835
    ClientLeft = 45
    ClientTop = 495
    ClientWidth = 4590
    Icon = "FrmRegister.frx":0000
    LinkTopic = "Form1"
    MaxButton = 0 'False
    MinButton = 0 'False
    ScaleHeight = 2835
    ScaleWidth = 4590
    StartUpPosition = 2 'CenterScreen
    Begin VB.TextBox TxtName
        Height = 375
        Left = 1800
        TabIndex = 2
        Top = 120
        Width = 2295
    End
    Begin VB.TextBox TxtPassword
        Height = 375
        IMEMode = 3 'DISABLE
        Left = 1800
        PasswordChar = "*"
        TabIndex = 1
        Top = 840
        Width = 2295
    End
    Begin VB.TextBox TxtPassword2
        Height = 375
        IMEMode = 3 'DISABLE
        Left = 1800
        PasswordChar = "*"
        TabIndex = 0
        Top = 1560
        Width = 2295
    End
    Begin VB.Label LblBuyerID
        BackStyle = 0 'Transparent
        Caption = "用 户 名"
        BeginProperty Font
        Name = "宋体"
        Size = 15
        Charset = 0
        Weight = 700
        Underline = 0 'False
        Italic = 0 'False
        Strikethrough = 0 'False
        EndProperty
        Height = 375
        Left = 360
        MouseIcon = "FrmRegister.frx":0CCA
        TabIndex = 7
        Top = 120
        Width = 1335
    End
    Begin VB.Label LblSalesmanName
        BackStyle = 0 'Transparent
        Caption = "密    码"
        BeginProperty Font
        Name = "宋体"
        Size = 15
        Charset = 0
        Weight = 700
        Underline = 0 'False
        Italic = 0 'False
        Strikethrough = 0 'False
        EndProperty
        Height = 375
        Left = 360
        MouseIcon = "FrmRegister.frx":0FD4
        TabIndex = 6
        Top = 840
        Width = 1335
    End
    Begin VB.Label LblDepartment
        BackStyle = 0 'Transparent
        Caption = "确认密码"
        BeginProperty Font
        Name = "宋体"
        Size = 15
        Charset = 0
        Weight = 700
        Underline = 0 'False
        Italic = 0 'False
        Strikethrough = 0 'False
        EndProperty
        Height = 375
        Left = 360
        MouseIcon = "FrmRegister.frx":12DE
        TabIndex = 5
        Top = 1560
        Width = 1335
    End
    Begin VB.Image Image4
        Height = 300
        Left = 2520
        Picture = "FrmRegister.frx":15E8
        Top = 2280
        Width = 300
    End
    Begin VB.Label LblCancel
        BackStyle = 0 'Transparent
        Caption = "取 消"
        BeginProperty Font
        Name = "宋体"
        Size = 12
        Charset = 0
        Weight = 700
        Underline = 0 'False
        Italic = 0 'False
        Strikethrough = 0 'False
        EndProperty
        Height = 255
        Left = 3120
        MouseIcon = "FrmRegister.frx":1A04
        MousePointer = 99 'Custom
        TabIndex = 4
        Top = 2280
        Width = 855
    End
    Begin VB.Image Image3
        Height = 300
        Left = 600
        Picture = "FrmRegister.frx":1D0E
        Top = 2280
        Width = 300
    End
    Begin VB.Label LblOK
        BackStyle = 0 'Transparent
        Caption = "确 定"
        BeginProperty Font
        Name = "宋体"
        Size = 12
        Charset = 0
        Weight = 700
        Underline = 0 'False
        Italic = 0 'False
        Strikethrough = 0 'False
        EndProperty
        Height = 255
        Left = 1200
        MouseIcon = "FrmRegister.frx":212A
        MousePointer = 99 'Custom
        TabIndex = 3
        Top = 2280
        Width = 735
    End
End
Attribute VB_Name = "FrmRegister"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub LblCancel_Click()
    Unload Me
End Sub

Private Sub LblOK_Click()
    
    '判断要编辑信息是否完整
    If Check = False Then
        Exit Sub
    End If
    
    With MyUsers
        .Name = TxtName.Text
        .Password = TxtPassword.Text
        
        
        '判断采购员ID是否已经存在
        If .In_DB(TxtName.Text) = True Then
            MsgBox "用户名已经存在,请重新设置"
            TxtName.SetFocus
            TxtName.SelStart = 0
            TxtName.SelLength = Len(TxtName)
            Exit Sub
        Else
            .Insert '添加
            MsgBox "添加成功,请等待管理员给您分配权限"
        End If
        
    End With
    Unload Me
End Sub


Private Function Check() As Boolean
    If Trim(TxtName) = "" Then
        MsgBox "请输入用户名"
        TxtName.SetFocus
        Check = False
        Exit Function
    End If
    If Trim(TxtPassword) = "" Then
        MsgBox "请输入密码"
        TxtPassword.SetFocus
        Check = False
        Exit Function
    End If
    If Trim(TxtPassword2) = "" Then
        MsgBox "请输入确认密码"
        TxtPassword2.SetFocus
        Check = False
        Exit Function
    End If
    If Trim(TxtPassword2) <> Trim(TxtPassword) Then
        MsgBox "两次输入密码不合,请重新输入"
        TxtPassword.Text = ""
        TxtPassword2.Text = ""
        TxtPassword.SetFocus
        Check = False
        Exit Function
    End If
    If Len(Trim(TxtPassword2)) < 6 Then
        MsgBox "密码小于6位,请重新设置"
        TxtPassword.Text = ""
        TxtPassword2.Text = ""
        TxtPassword.SetFocus
        Check = False
        Exit Function
    End If
    Check = True
End Function

⌨️ 快捷键说明

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