?? 用戶口令修改.frm
字號:
VERSION 5.00
Begin VB.Form Form19
Caption = "用戶口令修改"
ClientHeight = 3540
ClientLeft = 5130
ClientTop = 3360
ClientWidth = 5355
Icon = "用戶口令修改.frx":0000
LinkTopic = "Form19"
Picture = "用戶口令修改.frx":08CA
ScaleHeight = 3540
ScaleWidth = 5355
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = ""
DefaultCursorType= 0 '缺省游標(biāo)
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 345
Left = 720
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 2400
Visible = 0 'False
Width = 2175
End
Begin VB.CommandButton Command2
Caption = "取 消"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3000
TabIndex = 9
Top = 2760
Width = 975
End
Begin VB.CommandButton Command1
Caption = "確 定"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1320
TabIndex = 8
Top = 2760
Width = 975
End
Begin VB.TextBox Text3
Height = 270
IMEMode = 3 'DISABLE
Left = 2640
MaxLength = 8
PasswordChar = "*"
TabIndex = 7
Top = 2040
Width = 1815
End
Begin VB.TextBox Text2
Height = 270
IMEMode = 3 'DISABLE
Left = 2640
MaxLength = 8
PasswordChar = "*"
TabIndex = 5
Top = 1440
Width = 1815
End
Begin VB.TextBox Text1
Height = 270
IMEMode = 3 'DISABLE
Left = 2640
MaxLength = 8
PasswordChar = "*"
TabIndex = 3
Top = 840
Width = 1815
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "確定新口令:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1200
TabIndex = 6
Top = 2040
Width = 1455
End
Begin VB.Label Label4
BackStyle = 0 'Transparent
Caption = "新口令:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1200
TabIndex = 4
Top = 1440
Width = 975
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Height = 255
Left = 2760
TabIndex = 2
Top = 240
Width = 1695
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "原口令:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1200
TabIndex = 1
Top = 840
Width = 975
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "當(dāng)前用戶:"
BeginProperty Font
Name = "楷體_GB2312"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1200
TabIndex = 0
Top = 240
Width = 1215
End
End
Attribute VB_Name = "Form19"
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 Form_Load()
Data1.DatabaseName = App.Path + "\db.mdb"
Data1.RecordSource = "用戶管理"
Me.Height = 3945
Me.Width = 5475
End Sub
Private Sub Command1_Click()
If Text1.Text = "" And Text2.Text = "" And Text3.Text = "" Then
MsgBox "你沒有輸入更新信息!"
Else
If Text1.Text = "" Then
MsgBox "請輸入原密碼!"
Else
If Text2.Text = "" Then
MsgBox "你沒有輸入新密碼!"
Else
If Text3.Text = "" Then
MsgBox "請確認(rèn)你的新密碼!"
Else
If Text2.Text <> Text3.Text Then
MsgBox "你兩次輸入的密碼不同,請重新輸入新密碼!"
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
Else
Dim password As String
password = "密碼=" & "'" & Trim(Text1.Text) & "'"
Data1.Recordset.FindFirst password
If Data1.Recordset.NoMatch Then
MsgBox "你輸入的原密碼有誤!"
Else
Data1.Recordset.AddNew
Data1.Recordset.Fields("用戶名") = Label3.Caption
Data1.Recordset.Fields("用戶編號") = Label3.Caption
Data1.Recordset.Fields("密碼") = Text2.Text
Data1.Recordset.Update
Data1.Recordset.Delete
MsgBox "你已經(jīng)成功的更換了新密碼,請使用新密碼!"
End If
End If
End If
End If
End If
End If
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -