?? form1.frm
字號:
VERSION 5.00
Begin VB.Form frmchangepwd
Caption = "修改密碼"
ClientHeight = 4815
ClientLeft = 60
ClientTop = 450
ClientWidth = 5805
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4815
ScaleWidth = 5805
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton cmdcancel
Caption = "取 消"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3240
TabIndex = 7
Top = 3720
Width = 1215
End
Begin VB.CommandButton cmdok
Caption = "確 定"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
TabIndex = 6
Top = 3720
Width = 1215
End
Begin VB.TextBox confirmpwd
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 3000
MaxLength = 8
PasswordChar = "*"
TabIndex = 5
Top = 2520
Width = 1695
End
Begin VB.TextBox newpwd
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 3000
MaxLength = 8
PasswordChar = "*"
TabIndex = 4
Top = 1680
Width = 1695
End
Begin VB.TextBox oldpwd
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 3000
PasswordChar = "*"
TabIndex = 3
Top = 840
Width = 1695
End
Begin VB.Label Label3
Caption = "請確認(rèn)新密碼"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
TabIndex = 2
Top = 2640
Width = 1575
End
Begin VB.Label Label2
Caption = "請輸入新密碼"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
TabIndex = 1
Top = 1800
Width = 1575
End
Begin VB.Label Label1
Caption = "請輸入舊密碼"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
TabIndex = 0
Top = 960
Width = 1575
End
End
Attribute VB_Name = "frmchangepwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdcancel_Click()
Unload Me
Exit Sub
End Sub
Private Sub cmdok_Click()
Dim sql As String
Dim rs As ADODB.Recordset
If Trim(oldpwd.Text) = "" Then
MsgBox "請輸入舊密碼", vbOKOnly + vbExclamation, "提示"
oldpwd.SetFocus
Exit Sub
Else
If Trim(oldpwd.Text) <> Trim(userpassword) Then
MsgBox "舊密碼與登錄的密碼不同,請重新輸入!", vbOKOnly + vbExclamation, "提示"
oldpwd.Text = ""
oldpwd.SetFocus
ElseIf Trim(newpwd.Text) = "" Then
MsgBox "請輸入新密碼", vbOKOnly + vbExclamation, "提示"
newpwd.SetFocus
Exit Sub
ElseIf Trim(newpwd.Text) <> Trim(confirmpwd.Text) Then
MsgBox "兩次密碼不同", vbOKOnly + vbExclamation, "警告"
newpwd.Text = ""
confirmpwd.Text = ""
newpwd.SetFocus
Else
userpassword = newpwd
sql = "update userinfo set userpwd='" & newpwd & "'where userid='" & strusername & "'"
Call transactsql(sql, "salary")
MsgBox "密碼已經(jīng)修改", vbOKOnly + vbExclamation, "修改結(jié)果"
Unload Me
End If
End If
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -