?? frm_pass.frm
字號:
VERSION 5.00
Begin VB.Form frm_pass
Caption = "更改密碼"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 4680
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox pass2
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
IMEMode = 3 'DISABLE
Left = 1980
MaxLength = 10
PasswordChar = "*"
TabIndex = 7
Top = 1080
Width = 1965
End
Begin VB.TextBox pass3
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
IMEMode = 3 'DISABLE
Left = 1980
MaxLength = 10
PasswordChar = "*"
TabIndex = 6
Top = 1575
Width = 1965
End
Begin VB.TextBox pass1
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 345
IMEMode = 3 'DISABLE
Left = 1980
MaxLength = 10
PasswordChar = "*"
TabIndex = 0
Top = 600
Width = 1965
End
Begin VB.CommandButton Command2
Cancel = -1 'True
Caption = "取消(&C)"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 2655
TabIndex = 2
Top = 2250
Width = 1275
End
Begin VB.CommandButton Command1
Caption = "確定(&O)"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 1065
TabIndex = 1
Top = 2235
Width = 1275
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "新 密 碼:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 1005
TabIndex = 5
Top = 1170
Width = 1050
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "確 認:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 990
TabIndex = 4
Top = 1635
Width = 1050
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "原 密 碼:"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 1020
TabIndex = 3
Top = 675
Width = 1050
End
End
Attribute VB_Name = "frm_pass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub pass1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
pass2.SetFocus
End If
End Sub
Private Sub pass2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
pass3.SetFocus
End If
End Sub
Private Sub pass3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1.SetFocus
End If
End Sub
Private Sub Command1_Click()
Dim strsql As String
Dim msgtext As String
Dim mrc As ADODB.Recordset
strsql = "select * from users where user_id='" & strCurUser & "'"
Set mrc = ExecuteSQL(strsql, msgtext)
If mrc!user_pass = pass1.text Then
If pass2.text = pass3.text Then
strsql = "update users set user_pass='" & pass3.text & "'"
strsql = strsql & " where user_id='" & strCurUser & "'"
Set mrc = ExecuteSQL(strsql, msgtext)
MsgBox "密碼更改成功!", vbOKOnly, "提示"
Unload Me
Else
MsgBox "請確認您輸入的新密碼!", vbOKOnly, "提示"
pass2.text = ""
pass3.text = ""
End If
Else
MsgBox "原密碼輸入錯誤!請重新輸入", vbOKOnly, "提示"
pass1.text = ""
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -