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

📄 pwdinput.frm

📁 VB城市排水系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form pwdinput 
   Caption         =   "Form1"
   ClientHeight    =   1890
   ClientLeft      =   5025
   ClientTop       =   4560
   ClientWidth     =   4245
   LinkTopic       =   "Form1"
   ScaleHeight     =   1890
   ScaleWidth      =   4245
   Begin VB.CommandButton Command1 
      Caption         =   "下一步"
      Default         =   -1  'True
      Height          =   330
      Left            =   2070
      TabIndex        =   16
      Top             =   1440
      Width           =   960
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   330
      Left            =   3105
      TabIndex        =   15
      Top             =   1440
      Width           =   960
   End
   Begin VB.PictureBox Picture1 
      BorderStyle     =   0  'None
      Height          =   1050
      Left            =   90
      ScaleHeight     =   1050
      ScaleWidth      =   3975
      TabIndex        =   12
      Top             =   180
      Width           =   3975
      Begin VB.TextBox Text1 
         Height          =   285
         Left            =   1440
         TabIndex        =   1
         Top             =   135
         Width           =   2355
      End
      Begin VB.TextBox Text2 
         Height          =   285
         IMEMode         =   3  'DISABLE
         Left            =   1440
         TabIndex        =   2
         Top             =   585
         Width           =   2355
      End
      Begin VB.Label Label1 
         Caption         =   "用户"
         Height          =   285
         Left            =   135
         TabIndex        =   14
         Top             =   180
         Width           =   1050
      End
      Begin VB.Label Label2 
         Caption         =   "说明"
         Height          =   285
         Left            =   135
         TabIndex        =   13
         Top             =   630
         Width           =   825
      End
   End
   Begin VB.PictureBox Picture2 
      BorderStyle     =   0  'None
      Height          =   1050
      Left            =   90
      ScaleHeight     =   1050
      ScaleWidth      =   3975
      TabIndex        =   9
      Top             =   180
      Width           =   3975
      Begin VB.TextBox Text3 
         Height          =   285
         IMEMode         =   3  'DISABLE
         Left            =   1440
         PasswordChar    =   "*"
         TabIndex        =   3
         Top             =   135
         Width           =   2355
      End
      Begin VB.TextBox Text4 
         Height          =   285
         IMEMode         =   3  'DISABLE
         Left            =   1440
         PasswordChar    =   "*"
         TabIndex        =   4
         Top             =   585
         Width           =   2355
      End
      Begin VB.Label Label3 
         Caption         =   "重新输入密码"
         Height          =   285
         Left            =   135
         TabIndex        =   11
         Top             =   630
         Width           =   1185
      End
      Begin VB.Label Label4 
         Caption         =   "密码"
         Height          =   285
         Left            =   135
         TabIndex        =   10
         Top             =   180
         Width           =   1050
      End
   End
   Begin VB.PictureBox Picture3 
      BorderStyle     =   0  'None
      Height          =   1095
      Left            =   90
      ScaleHeight     =   1095
      ScaleWidth      =   3975
      TabIndex        =   5
      Top             =   180
      Width           =   3975
      Begin VB.Frame Frame1 
         Caption         =   "权限"
         Height          =   960
         Left            =   45
         TabIndex        =   6
         Top             =   45
         Width           =   3795
         Begin VB.OptionButton Option1 
            Caption         =   "管理员"
            Height          =   330
            Left            =   450
            TabIndex        =   8
            Top             =   360
            Width           =   1365
         End
         Begin VB.OptionButton Option2 
            Caption         =   "标准用户"
            Height          =   510
            Left            =   1890
            TabIndex        =   7
            Top             =   270
            Value           =   -1  'True
            Width           =   1185
         End
      End
   End
   Begin VB.CommandButton Command3 
      Caption         =   "上一步"
      Height          =   330
      Left            =   1125
      TabIndex        =   0
      Top             =   1440
      Width           =   870
   End
End
Attribute VB_Name = "pwdinput"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim access As String
Dim sql As String
Dim listitemx As ListItem
Dim listsubitemx As ListSubItem
If Command1.Caption = "确定" Then
    adopwdrs.MoveLast
    If adopwdrs.BOF Then adopwdrs.MoveFirst
    If Option1.Value = True Then
        access = "administrator"
    Else
        access = "guest"
    End If
    sql = "insert into 系统登录(用户,密码,权限) values ( '" & Text1.Text & "','" & Text3.Text & "' ,'" & access & "')"
    dbpwd.Execute sql
    
    Set listitemx = frmchange.ListView1.ListItems.Add(, , Text1.Text)
    Set listsubitemx = frmchange.ListView1.ListItems(frmchange.ListView1.ListItems.Count).ListSubItems.Add(, , access)
    GoTo lblunload
    
End If
If Picture1.Visible And Text1.Text <> "" Then
    Picture1.Visible = False
    Picture2.Visible = True
    Text3.SetFocus
ElseIf Picture2.Visible And Text3.Text <> "" Then
    If Text3.Text = Text4.Text Then
        Picture2.Visible = False
        Picture3.Visible = True
        Command1.Caption = "确定"
    Else
        MsgBox "密码输入不正确"
    End If
End If
    Exit Sub
lblunload:
    Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
If Picture2.Visible Then
    Picture2.Visible = False
    Picture1.Visible = True
ElseIf Picture3.Visible Then
    Picture3.Visible = False
    Picture2.Visible = True
    Command1.Caption = "上一步"
End If
End Sub

Private Sub Form_Load()
Picture1.Visible = True
Picture2.Visible = False
Picture3.Visible = False
Me.Show
Text1.SetFocus
End Sub

⌨️ 快捷键说明

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