?? frmupdatepw.frm
字號:
VERSION 5.00
Begin VB.Form frmUpdatePW
BackColor = &H80000007&
Caption = "Form1"
ClientHeight = 2115
ClientLeft = 60
ClientTop = 345
ClientWidth = 5205
LinkTopic = "Form1"
ScaleHeight = 2115
ScaleWidth = 5205
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox txt
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
IMEMode = 3 'DISABLE
Index = 0
Left = 1920
PasswordChar = "*"
TabIndex = 4
Top = 240
Width = 3015
End
Begin VB.TextBox txt
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
IMEMode = 3 'DISABLE
Index = 1
Left = 1920
PasswordChar = "*"
TabIndex = 3
Top = 720
Width = 3015
End
Begin VB.TextBox txt
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
IMEMode = 3 'DISABLE
Index = 2
Left = 1920
PasswordChar = "*"
TabIndex = 2
Top = 1200
Width = 3015
End
Begin VB.CommandButton cmdOK
Caption = "確 定"
Default = -1 'True
Height = 345
Left = 2880
TabIndex = 1
Top = 1560
Width = 975
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取 消"
Height = 345
Left = 3960
TabIndex = 0
Top = 1560
Width = 975
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "請輸入你的舊密碼:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 0
Left = 240
TabIndex = 7
Top = 360
Width = 1620
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "請輸入你的新密碼:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 1
Left = 240
TabIndex = 6
Top = 840
Width = 1620
End
Begin VB.Label lbl
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "請確認你的新密碼:"
ForeColor = &H00FFFFFF&
Height = 180
Index = 2
Left = 240
TabIndex = 5
Top = 1320
Width = 1620
End
End
Attribute VB_Name = "frmUpdatePW"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rst As Recordset
'響應 "關閉" 按鈕
Private Sub cmdCancel_Click()
Unload Me
End Sub
'響應 "確定" 按鈕
Private Sub cmdOK_Click()
Set rst = New Recordset
Call LinkDB(landWay, SName, "weboy", SUName, SUPw)
con.Open
rst.Open "select password from users where name='" & userName & "'", con, adOpenDynamic, adLockOptimistic
If rst!password <> txt(0).Text Then
MsgBox "舊密碼不對,請重新輸入!"
Exit Sub
End If
If txt(1).Text <> txt(2).Text Then
MsgBox "兩次輸入的密碼不同,請重新輸入!"
Exit Sub
End If
If Len(txt(1).Text) > 12 Then
MsgBox "密碼長度不得大于12位!"
Exit Sub
End If
rst.Close
con.Execute "update users set password='" & txt(1).Text & "' where name='" & userName & "'"
con.Close
MsgBox "密碼更新成功!"
Unload Me
End Sub
Private Sub Form_Load()
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -