?? frmeditpwd.frm
字號:
VERSION 5.00
Begin VB.Form frmEditPwd
Caption = "修改密碼"
ClientHeight = 3585
ClientLeft = 60
ClientTop = 450
ClientWidth = 5625
LinkTopic = "Form1"
ScaleHeight = 3585
ScaleWidth = 5625
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmdcancel
Caption = "取 消"
Height = 495
Left = 2880
TabIndex = 7
Top = 2760
Width = 1215
End
Begin VB.CommandButton cmdsave
Caption = "確 定"
Height = 495
Left = 960
TabIndex = 6
Top = 2760
Width = 1215
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 1800
MaxLength = 16
PasswordChar = "*"
TabIndex = 5
Top = 1920
Width = 2655
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 1800
MaxLength = 16
PasswordChar = "*"
TabIndex = 3
Top = 1320
Width = 2655
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋體"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 1800
MaxLength = 16
PasswordChar = "*"
TabIndex = 1
Top = 720
Width = 2655
End
Begin VB.Label Label3
Caption = "重輸入新密碼:"
Height = 255
Left = 600
TabIndex = 4
Top = 2040
Width = 1335
End
Begin VB.Label Label2
Caption = "請輸入新密碼:"
Height = 255
Left = 600
TabIndex = 2
Top = 1440
Width = 1215
End
Begin VB.Label Label1
Caption = "請輸入舊密碼:"
Height = 255
Left = 600
TabIndex = 0
Top = 840
Width = 1215
End
End
Attribute VB_Name = "frmEditPwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdSave_Click()
If Text1.Text <> pwd Then
MsgBox "舊密碼輸入錯誤,操作取消"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
Exit Sub
End If
If Text2.Text = Text3.Text Then '判斷二次密碼輸入是否相同
If Len(Text2.Text) < 6 Then
MsgBox "密碼長度不能小于6!", , "修改密碼"
Exit Sub
End If
'更新該帳號的密碼
Set con = New ADODB.Connection
con.Open "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=圖書銷售系統;Data Source=1062781987F44B5"
con.Execute "update Operator set Password='" & Text2.Text & "' where Account='" & username & "'"
MsgBox "密碼修改成功!", , "修改密碼"
Unload Me
Else
MsgBox "二次輸入密碼不正確"
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -