📄 修改密码.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Begin VB.Form Form14
BorderStyle = 1 'Fixed Single
Caption = "Form14"
ClientHeight = 4155
ClientLeft = 3315
ClientTop = 3045
ClientWidth = 5445
LinkTopic = "Form14"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 4155
ScaleWidth = 5445
Begin MSAdodcLib.Adodc Adodc1
Height = 855
Left = 4680
Top = 3120
Visible = 0 'False
Width = 1455
_ExtentX = 2566
_ExtentY = 1508
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox Text1
Height = 495
Left = 2040
TabIndex = 8
Top = 360
Width = 2535
End
Begin VB.CommandButton Command2
Caption = "取消修改"
Height = 495
Left = 3120
TabIndex = 4
Top = 3360
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定修改"
Height = 495
Left = 1320
TabIndex = 3
Top = 3360
Width = 1095
End
Begin VB.TextBox Text2
Height = 495
Left = 2040
TabIndex = 2
Top = 1080
Width = 2535
End
Begin VB.TextBox Text4
Height = 495
Left = 2040
TabIndex = 1
Top = 1920
Width = 2535
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 2040
Style = 2 'Dropdown List
TabIndex = 0
Top = 2520
Width = 2535
End
Begin VB.Label Label1
Caption = "确 认 密 码:"
Height = 495
Left = 840
TabIndex = 9
Top = 1965
Width = 1455
End
Begin VB.Label Label3
Caption = "类 型:"
Height = 495
Left = 840
TabIndex = 7
Top = 2640
Width = 1455
End
Begin VB.Label Label2
Caption = "旧 密 码:"
Height = 495
Left = 840
TabIndex = 6
Top = 480
Width = 1455
End
Begin VB.Label Label4
Caption = "新 密 码:"
Height = 495
Left = 840
TabIndex = 5
Top = 1200
Width = 1455
End
End
Attribute VB_Name = "Form14"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text4.Text = "" Or Combo1.Text = "" Then
MsgBox "请填写完整"
Else
If Text1.Text = Adodc1.Recordset(2).Value Then
If Text2.Text = Text4.Text Then
Adodc1.Recordset(2).Value = Text2.Text
Adodc1.Recordset(3).Value = Combo1.Text
Adodc1.Recordset.Update
MsgBox "密码修改成功!!!"
Adodc1.Refresh
Else
MsgBox "输入的密码不一致,请重新输入!!!"
End If
Else
MsgBox "输入的旧密码不正解,请重新输入!!!"
End If
End If
End Sub
Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\student1.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from admin where name='" & yonghu & "'"
Adodc1.Refresh
If yonghu = "user" Then
Combo1.AddItem "0"
Combo1.AddItem "1"
Else
Combo1.AddItem "1"
End If
Me.Caption = "修改密码"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -