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

📄 chgpwd.frm

📁 一部酒店管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form chgpwd 
   BackColor       =   &H00C0E0FF&
   Caption         =   "修改密码"
   ClientHeight    =   2100
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   3090
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2100
   ScaleWidth      =   3090
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "返回"
      Height          =   375
      Left            =   1560
      TabIndex        =   5
      Top             =   1440
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      Height          =   375
      Left            =   360
      TabIndex        =   4
      Top             =   1440
      Width           =   855
   End
   Begin VB.TextBox txt_pwd2 
      BackColor       =   &H00808080&
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   1320
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   680
      Width           =   1215
   End
   Begin VB.TextBox txt_pwd1 
      BackColor       =   &H00808080&
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   1320
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   320
      Width           =   1215
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackColor       =   &H00C0E0FF&
      Caption         =   "确认密码:"
      Height          =   180
      Left            =   240
      TabIndex        =   2
      Top             =   720
      Width           =   810
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackColor       =   &H00C0E0FF&
      Caption         =   "新密码:"
      Height          =   180
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   630
   End
End
Attribute VB_Name = "chgpwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    Call ChangePwd
End Sub

Private Sub Command2_Click()

    Unload Me
    
End Sub

Private Sub Form_Load()
    
     '窗口居中
    Me.Left = (Screen.Width - Me.Width) / 2
    Me.Top = (Screen.Height - Me.Height) / 2 - 550
    
End Sub


'修改密码
Private Sub ChangePwd()
    
   If txt_pwd1.Text = "" Then
        MsgBox "新密码不能为空!", vbExclamation
        txt_pwd1.SetFocus
        Exit Sub
   End If
    
   If txt_pwd2.Text = "" Then
        MsgBox "新密码不能为空!", vbExclamation
        txt_pwd2.SetFocus
        Exit Sub
   End If
   
   If txt_pwd1.Text <> txt_pwd2.Text Then
        MsgBox "两次输入新密码不相同!", vbExclamation
        txt_pwd1.SetFocus
        Exit Sub
   End If

    Dim str As String
    
    str = "update userinfo set pass='" & txt_pwd1.Text & "' where uid='" & m_user & "'"
    
    myCon.Execute (str)
    
    MsgBox "修改成功!", vbExclamation
    Unload Me
    
End Sub

⌨️ 快捷键说明

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