?? form10.frm
字號:
VERSION 5.00
Begin VB.Form Form10
Caption = "管理員密碼修改"
ClientHeight = 3705
ClientLeft = 60
ClientTop = 450
ClientWidth = 5865
LinkTopic = "Form10"
ScaleHeight = 3705
ScaleWidth = 5865
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "確定"
Height = 375
Left = 3360
TabIndex = 5
Top = 2880
Width = 1455
End
Begin VB.Frame Frame1
Caption = "修改密碼"
Height = 2415
Left = 360
TabIndex = 0
Top = 240
Width = 4455
Begin VB.TextBox Text4
Height = 270
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 9
Top = 1920
Width = 2295
End
Begin VB.TextBox Text3
Height = 270
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 8
Top = 1440
Width = 2295
End
Begin VB.TextBox Text2
Height = 270
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 7
Top = 960
Width = 2295
End
Begin VB.TextBox Text1
Height = 270
Left = 1680
TabIndex = 6
Top = 480
Width = 2295
End
Begin VB.Label Label4
Caption = "重復新密碼"
Height = 255
Left = 360
TabIndex = 4
Top = 1920
Width = 1095
End
Begin VB.Label Label3
Caption = "新密碼"
Height = 375
Left = 360
TabIndex = 3
Top = 1440
Width = 615
End
Begin VB.Label Label2
Caption = "原始密碼"
Height = 255
Left = 360
TabIndex = 2
Top = 960
Width = 735
End
Begin VB.Label Label1
Caption = "ID"
Height = 255
Left = 360
TabIndex = 1
Top = 480
Width = 255
End
End
End
Attribute VB_Name = "Form10"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If rsgly.State = adStateOpen Then rsgly.Close
If Text1.Text = "" Then MsgBox "ID", vbOKOnly, "提示": Exit Sub
If Text2.Text = "" Then MsgBox "原密碼", vbOKOnly, "提示": Exit Sub
If Text3.Text = "" Then MsgBox "新密碼", vbOKOnly, "提示": Exit Sub
If Text4.Text = "" Then MsgBox "重復新密碼!", vbOKOnly, "提示": Exit Sub
If Text3.Text <> Text4.Text Then MsgBox "兩次輸入新密碼不同,請確認!", vbOKOnly, "提示": Exit Sub
rsgly.Open "select * from 管理員 where ID='" + Text1.Text + "'", cn, adOpenKeyset, adLockOptimistic
If rsgly.RecordCount = 0 Then
MsgBox "無此ID,請點信息確認.", vbOKOnly, "提示信息"
Text1.SetFocus
SendKeys "{Home}+{End}": Exit Sub
rsgly.Open "select 原始密碼 from 管理員 where ID='" + Text1.Text + "'", cn, adOpenKeyset, adLockOptimistic
End If
If rsgly.Fields("ID") <> Text1.Text Then
MsgBox "原始密碼錯誤.", vbOKOnly, "提示信息"
Text2.SetFocus
SendKeys "{Home}+{End}": Exit Sub
rsgly.Fields("ID") = Text1.Text
rsgly.Fields("密碼") = Text3.Text
rsgly.Update
MsgBox "操作成功!", vbOKOnly, "提示"
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -