- VERSION 5.00
- Begin VB.Form frmChangPass
- BorderStyle = 3 'Fixed Dialog
- Caption = "修改密码"
- ClientHeight = 2535
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 4680
- Icon = "frmChangPass.frx":0000
- LinkTopic = "Form1"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 2535
- ScaleWidth = 4680
- ShowInTaskbar = 0 'False
- StartUpPosition = 3 '窗口缺省
- Begin VB.CommandButton CancelButton
- Cancel = -1 'True
- Caption = "取消"
- Height = 330
- Left = 2640
- TabIndex = 8
- Top = 1980
- Width = 975
- End
- Begin VB.CommandButton OKButton
- Caption = "确定"
- Default = -1 'True
- Height = 330
- Left = 1440
- TabIndex = 7
- Top = 1980
- Width = 975
- End
- Begin VB.TextBox txtConfirm
- Height = 270
- IMEMode = 3 'DISABLE
- Left = 1320
- PasswordChar = "*"
- TabIndex = 6
- Top = 1455
- Width = 2655
- End
- Begin VB.TextBox txtNewPass
- Height = 270
- IMEMode = 3 'DISABLE
- Left = 1320
- PasswordChar = "*"
- TabIndex = 4
- Top = 1065
- Width = 2655
- End
- Begin VB.TextBox txtOldPass
- Height = 270
- IMEMode = 3 'DISABLE
- Left = 1320
- PasswordChar = "*"
- TabIndex = 2
- Top = 675
- Width = 2655
- End
- Begin VB.Label Label3
- Caption = "新密码:"
- Height = 255
- Left = 600
- TabIndex = 5
- Top = 1455
- Width = 735
- End
- Begin VB.Label Label2
- Caption = "新密码:"
- Height = 255
- Left = 600
- TabIndex = 3
- Top = 1065
- Width = 735
- End
- Begin VB.Label Label1
- Caption = "原密码:"
- Height = 255
- Left = 600
- TabIndex = 1
- Top = 675
- Width = 735
- End
- Begin VB.Label lbAdmin
- Caption = "用户名:manager"
- Height = 255
- Left = 600
- TabIndex = 0
- Top = 315
- Width = 3255
- End
- End
- Attribute VB_Name = "frmChangPass"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- '****************************************************************************
- '人人为我,我为人人
- '枕善居收藏整理
- '发布日期:2008/01/21
- '描 述:汽车维修管理系统SQL2000版
- '网 站:http://www.Mndsoft.com/ (VB6源码博客)
- '网 站:http://www.VbDnet.com/ (VB.NET源码博客,主要基于.NET2005)
- 'e-mail :Mndsoft@163.com
- 'e-mail :Mndsoft@126.com
- 'OICQ :88382850
- ' 如果您有新的好的代码别忘记给枕善居哦!
- '****************************************************************************
- Private Sub CancelButton_Click()
- Unload Me
- End Sub
- Private Sub Form_Load()
- lbAdmin.Caption = "用户名:" & g_Admin
- End Sub
- Private Sub OKButton_Click()
- If PassIsTrue(g_Admin, txtOldPass.Text) Then
- If txtNewPass.Text = txtConfirm.Text Then
- g_Conn.Execute ("Update Users set Upass='" & txtNewPass.Text & "' where username='" & g_Admin & "'")
- Unload Me
- Else
- MsgBox "两个新密码不一致,请重新输入"
- End If
- Else
- MsgBox "原密码错误!"
- End If
- End Sub