📄 个人资料修改.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form9
BorderStyle = 0 'None
Caption = "用户密码修改"
ClientHeight = 5145
ClientLeft = 0
ClientTop = 0
ClientWidth = 5685
LinkTopic = "Form9"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5145
ScaleWidth = 5685
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text6
Height = 375
IMEMode = 3 'DISABLE
Left = 2040
PasswordChar = "*"
TabIndex = 11
Top = 3480
Width = 2175
End
Begin VB.TextBox Text5
Height = 375
IMEMode = 3 'DISABLE
Left = 2040
PasswordChar = "*"
TabIndex = 9
Top = 2120
Width = 2175
End
Begin VB.CommandButton Command3
BackColor = &H80000013&
Caption = "退出"
Height = 375
Left = 3240
Style = 1 'Graphical
TabIndex = 8
Top = 4200
Width = 1095
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 6120
Top = 1800
Visible = 0 'False
Width = 1455
_ExtentX = 2566
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\wangyufei\VB编程\050305\登陆.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\wangyufei\VB编程\050305\登陆.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "表1"
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 Text4
DataField = "usernum"
DataSource = "Adodc1"
Height = 270
Left = 6600
TabIndex = 7
Text = "Text4"
Top = 1200
Visible = 0 'False
Width = 255
End
Begin VB.CommandButton Command1
BackColor = &H80000013&
Caption = "确认"
Height = 375
Left = 1680
Style = 1 'Graphical
TabIndex = 6
Top = 4200
Width = 1095
End
Begin VB.TextBox Text3
Height = 375
IMEMode = 3 'DISABLE
Left = 2040
PasswordChar = "*"
TabIndex = 5
Top = 2800
Width = 2175
End
Begin VB.TextBox Text2
Height = 270
Left = 6240
TabIndex = 3
Text = "Text2"
Top = 1320
Visible = 0 'False
Width = 180
End
Begin VB.TextBox Text1
BackColor = &H80000013&
ForeColor = &H00000000&
Height = 375
Left = 2040
Locked = -1 'True
TabIndex = 2
Top = 1440
Width = 2175
End
Begin VB.Label Label5
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户密码修改"
BeginProperty Font
Name = "楷体_GB2312"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 210
Left = 2160
TabIndex = 12
Top = 240
Width = 1260
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码确认:"
ForeColor = &H8000000D&
Height = 180
Left = 960
TabIndex = 10
Top = 3600
Width = 810
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "新密码: "
ForeColor = &H8000000D&
Height = 180
Left = 1080
TabIndex = 4
Top = 2880
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "原密码:"
ForeColor = &H8000000D&
Height = 180
Left = 1080
TabIndex = 1
Top = 2280
Width = 630
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户名:"
ForeColor = &H8000000D&
Height = 180
Left = 1080
TabIndex = 0
Top = 1560
Width = 630
End
Begin VB.Image Image1
Height = 5160
Left = 0
Picture = "个人资料修改.frx":0000
Top = 0
Width = 5700
End
End
Attribute VB_Name = "Form9"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim yy As Integer
Private Sub Command1_Click()
If Text5.Text <> Text2.Text Then
MsgBox "原密码错误!", vbCritical, "失败"
Text5.Text = ""
Text3.Text = ""
Text6.Text = ""
Else
If Text6.Text <> Text3.Text Then
MsgBox " 新密码不一致!", vbCritical, "失败"
Text3.Text = ""
Text6.Text = ""
Else
If Len(Text3.Text) < 4 Then
MsgBox " 密码位数不能少于4位!", vbCritical, "失败"
Text3.Text = ""
Text6.Text = ""
Else
Adodc1.Recordset.MoveFirst
Do While Not Adodc1.Recordset.EOF
If Adodc1.Recordset.Fields("usernum") = Text1.Text Then
Adodc1.Recordset.Fields("usernum") = Text1.Text
Adodc1.Recordset.Fields("password") = Text3.Text
password = Text3.Text
user = Text1.Text
Adodc1.Recordset.MoveFirst
GoTo ee
'GoTo ty
Else
Adodc1.Recordset.MoveNext
End If
Loop
GoTo ty
'ty:
'yy = yy + 1
'Call Command1_Click
ee:
MsgBox "修改成功!"
ty:
Unload Form9
End If
End If
End If
End Sub
Private Sub Command3_Click()
main.Enabled = True
Unload Me
End Sub
Private Sub Form_Load()
Text3.Text = ""
Text6.Text = ""
'Text3.SetFocus
Text5.Text = ""
main.Enabled = False
yy = 0
End Sub
Private Sub Form_Unload(cancel As Integer)
main.Enabled = True
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -