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

📄 frmadduser.frm

📁 通讯录
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmAddUser 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "注册用户"
   ClientHeight    =   2265
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   4680
   Icon            =   "frmAddUser.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   2265
   ScaleWidth      =   4680
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox txtRepassword 
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1560
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   1200
      Width           =   2325
   End
   Begin VB.TextBox txtPassword 
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1545
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   735
      Width           =   2325
   End
   Begin VB.CommandButton cmdBack 
      Cancel          =   -1  'True
      Caption         =   "返回"
      Height          =   390
      Left            =   2835
      TabIndex        =   4
      Top             =   1710
      Width           =   1140
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   390
      Left            =   1230
      TabIndex        =   3
      Top             =   1710
      Width           =   1140
   End
   Begin VB.TextBox txtUserName 
      Height          =   345
      Left            =   1545
      TabIndex        =   0
      Top             =   345
      Width           =   2325
   End
   Begin VB.Label lblLabels 
      Caption         =   "重复密码(&P):"
      Height          =   270
      Index           =   2
      Left            =   360
      TabIndex        =   7
      Top             =   1200
      Width           =   1080
   End
   Begin VB.Label lblLabels 
      Caption         =   "密码(&P):"
      Height          =   270
      Index           =   1
      Left            =   360
      TabIndex        =   6
      Top             =   750
      Width           =   1080
   End
   Begin VB.Label lblLabels 
      Caption         =   "用户名称(&U):"
      Height          =   270
      Index           =   0
      Left            =   360
      TabIndex        =   5
      Top             =   360
      Width           =   1080
   End
End
Attribute VB_Name = "frmAddUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdBack_Click()
Unload frmAddUser
End Sub

Private Sub cmdOK_Click()
Dim strUser$, strPwd$, strRePwd$
strUser = Trim(txtUserName.Text)
strPwd = Trim(txtPassword.Text)
strRePwd = Trim(txtRepassword.Text)
If strUser = "" Or strPwd = "" Or strRePwd = "" Then
   MsgBox "信息未输入完全!", 48, "提示"
   Exit Sub
End If
If strPwd <> strRePwd Then
    MsgBox "两次密码不一致!", 48, "提示"
    txtPassword.Text = ""
    txtRepassword.Text = ""
    txtPassword.SetFocus
    Exit Sub
End If
strSQL = "select * from userinfo where uname='" + strUser + "'"
Set RS = conn.Execute(strSQL)
If Not RS.EOF Then
   MsgBox "该用户已经存在!", 48, "提示"
    txtUserName.Text = ""
    txtUserName.SetFocus
    RS.Close
    Exit Sub
End If
strSQL = "insert into userinfo values('" + strUser + "','" + strPwd + "')"
conn.Execute strSQL
MsgBox "用户添加成功!", 64, "提示"
RS.Close
End Sub

⌨️ 快捷键说明

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