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

📄 frmtianjiayonghu.frm

📁 校园导游管理系统!!这个应该对很多人都比较有用
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmtianjiayonghu 
   Caption         =   "添加用户"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   2880
      TabIndex        =   7
      Top             =   2520
      Width           =   1335
   End
   Begin VB.CommandButton cmdok 
      Caption         =   "确认"
      Height          =   375
      Left            =   600
      TabIndex        =   6
      Top             =   2520
      Width           =   1215
   End
   Begin VB.TextBox txtpassword2 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   2520
      PasswordChar    =   "*"
      TabIndex        =   5
      Top             =   1680
      Width           =   1815
   End
   Begin VB.TextBox txtpassword1 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   2520
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   960
      Width           =   1815
   End
   Begin VB.TextBox txtusername 
      Height          =   495
      Left            =   2520
      TabIndex        =   3
      Top             =   240
      Width           =   1815
   End
   Begin VB.Label Label3 
      Caption         =   "请确认的密码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   360
      TabIndex        =   2
      Top             =   1680
      Width           =   1935
   End
   Begin VB.Label Label2 
      Caption         =   "请输入你的密码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   1
      Top             =   840
      Width           =   1815
   End
   Begin VB.Label Label1 
      Caption         =   "请输入你的用户名"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   240
      Width           =   1815
   End
End
Attribute VB_Name = "frmtianjiayonghu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()

End Sub

Private Sub cmdok_Click()
Dim txtsql As String, mrc As ADODB.Recordset, msgtext As String
If Trim(txtusername.Text) = "" Then
frmmain.StatusBarmy.Panels.Item(1).Text = "请输入你用户名"
txtusername.SetFocus
Exit Sub
Else
txtsql = "select * from user_info"
Set mrc = executesql(txtsql, msgtext)
While (mrc.EOF = False)
If Trim(mrc.Fields(0)) = Trim(txtusername.Text) Then
frmmain.StatusBarmy.Panels.Item(1).Text = "该用户已经存在,请重输入用户名"
txtusername.SetFocus
txtusername.Text = ""
txtpassword1.Text = ""
txtpassword2.Text = ""
Exit Sub
Else
mrc.MoveNext
End If
Wend
End If
If Trim(txtpassword1.Text) = "" Then
frmmain.StatusBarmy.Panels.Item(1).Text = "密码不能为空"
txtpassword1.Text = ""
txtpassword1.SetFocus
txtpassword2.Text = ""
Else
 If Trim(txtpassword1.Text) <> Trim(txtpassword2.Text) Then
 frmmain.StatusBarmy.Panels.Item(1).Text = "密码确认不一致,请重输入"
 txtpassword1.SetFocus
 txtpassword1.Text = ""
 txtpassword2.Text = ""
 Exit Sub
 Else
 mrc.AddNew
 mrc.Fields(0) = txtusername.Text
 mrc.Fields(1) = txtpassword1.Text
 mrc.Update
 mrc.Close
 Me.Hide
 frmmain.StatusBarmy.Panels.Item(1) = "用户添加成功"
 End If
 End If
 End Sub
 
 
 


Private Sub Command2_Click()
txtusername.Text = ""
txtpassword1 = ""
txtpassword2 = ""
End Sub

⌨️ 快捷键说明

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