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

📄 frmglyxx.frm

📁 餐饮管理系统 包括29个功能模板 内容丰富
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Frmglyxx 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "信息管理"
   ClientHeight    =   2745
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4485
   Icon            =   "frmglyxx.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2745
   ScaleWidth      =   4485
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox Text4 
      Enabled         =   0   'False
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   9
      Text            =   "Text4"
      Top             =   600
      Width           =   2655
   End
   Begin VB.CommandButton Command1 
      Caption         =   "修改(&U)"
      Height          =   375
      Left            =   1080
      TabIndex        =   5
      Top             =   2280
      Width           =   1095
   End
   Begin VB.CommandButton Command3 
      Caption         =   "确定(&T)"
      Default         =   -1  'True
      Height          =   375
      Left            =   1080
      TabIndex        =   8
      Top             =   2280
      Visible         =   0   'False
      Width           =   1095
   End
   Begin VB.TextBox Text3 
      Height          =   390
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   1575
      Visible         =   0   'False
      Width           =   2655
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消(&F)"
      Height          =   375
      Left            =   2760
      TabIndex        =   6
      Top             =   2280
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   390
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1080
      Visible         =   0   'False
      Width           =   2655
   End
   Begin VB.TextBox Text1 
      Enabled         =   0   'False
      Height          =   375
      Left            =   1440
      Locked          =   -1  'True
      TabIndex        =   2
      Text            =   "Text1"
      Top             =   135
      Width           =   2655
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "输入原密码:"
      Height          =   180
      Left            =   210
      TabIndex        =   11
      Top             =   720
      Visible         =   0   'False
      Width           =   1080
   End
   Begin VB.Label Label4 
      Alignment       =   1  'Right Justify
      AutoSize        =   -1  'True
      Caption         =   "密  码:"
      Height          =   180
      Left            =   570
      TabIndex        =   10
      Top             =   720
      Width           =   720
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "重复新密码:"
      Height          =   180
      Left            =   210
      TabIndex        =   7
      Top             =   1680
      Visible         =   0   'False
      Width           =   1080
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "管理员:"
      Height          =   180
      Left            =   570
      TabIndex        =   1
      Top             =   225
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "输入新密码:"
      Height          =   180
      Left            =   210
      TabIndex        =   0
      Top             =   1200
      Visible         =   0   'False
      Width           =   1080
   End
End
Attribute VB_Name = "Frmglyxx"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rs As New ADODB.Recordset
Private Sub Command1_Click()
   Command3.Visible = True
   Command1.Visible = False
   Label2.Visible = True
   Text3.Visible = True
   Text2.Enabled = True
   Label4.Visible = False
   Label5.Visible = True
   Text4.Text = ""
   Text4.Enabled = True
   Label1.Visible = True
   Text2.Visible = True
End Sub

Private Sub Command2_Click()
   Unload Me
End Sub

Private Sub Command3_Click()
  If Text4.Text = "" Then
     MsgBox "原密码不能为空!", vbOKOnly + vbExclamation, "提示"
     Text4.SetFocus
     ElseIf Text2.Text = "" Or Text3.Text = "" Or Text2.Text <> Text3.Text Then
        MsgBox "新密码不能为空!或二次输入不一致", vbOKOnly + vbExclamation, "警告"
        Text2.SetFocus
        ElseIf Text4.Text = Trim(rs.Fields(0)) Then
            rs.Update "密码", Text2.Text
            MsgBox "密码修改成功!", vbOKOnly + vbInformation, "恭喜"
            Unload Me
            Else
                MsgBox "原密码错误!", vbOKOnly + vbExclamation, "警告"
     End If
End Sub

Private Sub form_Load()
   Text1.Text = uname
   rs.Open "select 密码 from 管理员 where 管理员='" & uname & "'", conn, adOpenDynamic, 3
End Sub

Private Sub Form_Unload(Cancel As Integer)
  If rs.State Then rs.Close
End Sub

⌨️ 快捷键说明

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