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

📄 add_user.frm

📁 商品管理系统 商品管理系统 商品管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form tianjiayonghuming 
   Caption         =   "添加新用户名和密码"
   ClientHeight    =   3300
   ClientLeft      =   60
   ClientTop       =   750
   ClientWidth     =   4185
   LinkTopic       =   "Form1"
   ScaleHeight     =   3300
   ScaleWidth      =   4185
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   495
      Left            =   1680
      TabIndex        =   8
      Top             =   2520
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   495
      Left            =   240
      TabIndex        =   7
      Top             =   2520
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Caption         =   "请输入新用户名和密码"
      Height          =   2175
      Left            =   240
      TabIndex        =   0
      Top             =   240
      Width           =   3615
      Begin VB.TextBox Text3 
         Height          =   405
         IMEMode         =   3  'DISABLE
         Left            =   1320
         PasswordChar    =   "*"
         TabIndex        =   3
         Top             =   1440
         Width           =   1935
      End
      Begin VB.TextBox Text2 
         Height          =   405
         IMEMode         =   3  'DISABLE
         Left            =   1320
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   840
         Width           =   1935
      End
      Begin VB.TextBox Text1 
         Height          =   405
         Left            =   1320
         TabIndex        =   1
         Top             =   240
         Width           =   1935
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "确认密码"
         Height          =   195
         Left            =   360
         TabIndex        =   6
         Top             =   1560
         Width           =   720
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "输入密码"
         Height          =   195
         Left            =   360
         TabIndex        =   5
         Top             =   960
         Width           =   720
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "输入用户名"
         Height          =   195
         Left            =   240
         TabIndex        =   4
         Top             =   360
         Width           =   900
      End
   End
   Begin VB.Menu mima 
      Caption         =   "更新密码"
   End
   Begin VB.Menu tianjiaming 
      Caption         =   "添加用户名"
   End
   Begin VB.Menu tuichu 
      Caption         =   "退出"
   End
End
Attribute VB_Name = "tianjiayonghuming"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim sql As String
Dim rs_add As New ADODB.Recordset
If Trim(Text1.Text) = "" Then
   MsgBox "用户名不能为空", vbOKOnly + vbExclamation, ""
   Exit Sub
   Text1.SetFocus
Else
   sql = "select * from 用户管理"
   rs_add.Open sql, conn, adOpenKeyset, adLockPessimistic
   While (rs_add.EOF = False)
        If Trim(rs_add.Fields(0)) = Trim(Text1.Text) Then
           MsgBox "已有这个用户", vbOKOnly + vbExclamation, ""
           Text1.SetFocus
           Text1.Text = ""
           Text2.Text = ""
           Text3.Text = ""
           Exit Sub
         Else
           rs_add.MoveNext
         End If
    Wend
    If Trim(Text2.Text) <> Trim(Text3.Text) Then
       MsgBox "两次密码不一致", vbOKOnly + vbExclamation, ""
       Text2.SetFocus
       Text2.Text = ""
       Text3.Text = ""
       Exit Sub
    Else
       rs_add.AddNew
       rs_add.Fields(0) = Text1.Text
       rs_add.Fields(1) = Text2.Text
       rs_add.Fields(2) = Text3.Text
       rs_add.Update
       rs_add.Close
       MsgBox "添加用户成功", vbOKOnly + vbExclamation, ""
       Text1.SetFocus
           Text1.Text = ""
           Text2.Text = ""
           Text3.Text = ""
    End If
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub mima_Click()
gengxinmima.Show
Unload Me
End Sub

Private Sub tianjiaming_Click()
tianjiayonghuming.Show

End Sub

Private Sub tuichu_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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