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

📄 frmpwdgl.frm

📁 此为水费收费管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{CE671F01-259E-40DA-92FE-95803E2ECBB5}#1.0#0"; "SMARTXPBUTTON.OCX"
Begin VB.Form FrmPwdGl 
   BackColor       =   &H00E0E0E0&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "当前用户:"
   ClientHeight    =   2310
   ClientLeft      =   30
   ClientTop       =   330
   ClientWidth     =   4140
   Icon            =   "FrmPwdGl.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2310
   ScaleWidth      =   4140
   ShowInTaskbar   =   0   'False
   Begin VB.Frame Frame1 
      BackColor       =   &H00E0E0E0&
      Height          =   2388
      Left            =   0
      TabIndex        =   0
      Top             =   -84
      Width           =   4128
      Begin VB.TextBox Text3 
         Appearance      =   0  'Flat
         BackColor       =   &H00DFFFF8&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   348
         IMEMode         =   3  'DISABLE
         Left            =   2055
         MaxLength       =   20
         PasswordChar    =   "*"
         TabIndex        =   3
         Text            =   "Text3"
         Top             =   1224
         Width           =   1890
      End
      Begin VB.TextBox Text2 
         Appearance      =   0  'Flat
         BackColor       =   &H00DFFFF8&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   348
         IMEMode         =   3  'DISABLE
         Left            =   2055
         MaxLength       =   20
         PasswordChar    =   "*"
         TabIndex        =   2
         Text            =   "Text2"
         Top             =   762
         Width           =   1890
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         BackColor       =   &H00DFFFF8&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   348
         IMEMode         =   3  'DISABLE
         Left            =   2055
         MaxLength       =   20
         PasswordChar    =   "*"
         TabIndex        =   1
         Text            =   "Text1"
         Top             =   300
         Width           =   1890
      End
      Begin SmartXPButton.XpButton Command1 
         Default         =   -1  'True
         Height          =   435
         Left            =   600
         TabIndex        =   7
         Top             =   1800
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   767
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "确定(&O)"
         PictureSmoothBackColor=   13882323
         ButtonPicture   =   "FrmPwdGl.frx":0442
      End
      Begin SmartXPButton.XpButton Command2 
         Height          =   435
         Left            =   2280
         TabIndex        =   8
         Top             =   1800
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   767
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Caption         =   "退出(&X)"
         PictureSmoothBackColor=   13882323
         ButtonPicture   =   "FrmPwdGl.frx":059C
      End
      Begin VB.Image Image3 
         Height          =   480
         Left            =   225
         Picture         =   "FrmPwdGl.frx":06F6
         Top             =   1185
         Width           =   480
      End
      Begin VB.Image Image2 
         Height          =   480
         Left            =   225
         Picture         =   "FrmPwdGl.frx":0B38
         Top             =   690
         Width           =   480
      End
      Begin VB.Image Image1 
         Height          =   480
         Left            =   225
         Picture         =   "FrmPwdGl.frx":0F7A
         Top             =   210
         Width           =   480
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackColor       =   &H00808000&
         BackStyle       =   0  'Transparent
         Caption         =   "确认新密码:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   210
         Left            =   855
         TabIndex        =   6
         Top             =   1305
         Width           =   1290
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackColor       =   &H00808000&
         BackStyle       =   0  'Transparent
         Caption         =   "新  密  码:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   210
         Left            =   855
         TabIndex        =   5
         Top             =   840
         Width           =   1290
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackColor       =   &H00808000&
         BackStyle       =   0  'Transparent
         Caption         =   "旧  密  码:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00000000&
         Height          =   210
         Left            =   855
         TabIndex        =   4
         Top             =   360
         Width           =   1290
      End
   End
End
Attribute VB_Name = "FrmPwdGl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
    If MdlMain.Password = ConVertPwd(Text1.Text) Then
        If Trim(Text2.Text) = Trim(Text3.Text) Then
            MdlMain.Password = ConVertPwd(Text2.Text)
            Dim Cnn As New ADODB.Connection
            Dim Rec As New ADODB.Recordset
            Cnn.Open DbLoginSql
            Rec.CursorLocation = adUseClient
            Rec.Open "select * from LoginUser where userbh='" & MdlMain.LoginBh & "' order by userbh", _
                Cnn, adOpenDynamic, adLockOptimistic
            Rec.Fields("password").Value = MdlMain.Password
            Rec.Update
            Rec.Close
            Set Rec = Nothing
            Cnn.Close
            Set Cnn = Nothing
            MsgBox "密码修改成功!!" & Chr$(13) & Chr$(10) & Chr$(13) & _
                "请按确定返回...", vbOKOnly + vbInformation, "恭喜你..."
            Unload Me
        Else
            MsgBox "确认新密码时出错,请重新输入!", vbOKOnly + vbCritical, _
                "新密码出错"
            Text2.Text = ""
            Text3.Text = ""
            Text2.SetFocus
        End If
    Else
        MsgBox "请留意旧密码是否输入错了?", vbOKOnly + vbCritical, "旧密码出错"
        Text1.SetFocus
    End If
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
    If KeyAscii = vbKeyEscape Then Unload Me
End Sub

Private Sub Form_Load()
    Me.KeyPreview = True
    Me.Left = GetSetting(App.EXEName, "修改密码", "left", (Screen.Width - Me.Width) / 2)
    Me.Top = GetSetting(App.EXEName, "修改密码", "top", (Screen.Height - Me.Height) / 2)
    Me.Caption = "当前用户:" & MdlMain.LoginUser
    Text1.Text = ""
    Text2.Text = ""
    Text3.Text = ""
End Sub

Private Sub Form_Unload(Cancel As Integer)
    SaveSetting App.EXEName, "修改密码", "left", Me.Left
    SaveSetting App.EXEName, "修改密码", "top", Me.Top
End Sub

Private Sub Text1_GotFocus()
    Text1.SelStart = 0
    Text1.SelLength = Len(Text1.Text)
End Sub

Private Sub Text2_GotFocus()
    Text2.SelStart = 0
    Text2.SelLength = Len(Text2.Text)
End Sub

Private Sub Text3_GotFocus()
    Text3.SelStart = 0
    Text3.SelLength = Len(Text3.Text)
End Sub



⌨️ 快捷键说明

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