📄 key.frm
字号:
VERSION 5.00
Begin VB.Form Form3
Caption = "修改用户名和密码"
ClientHeight = 4470
ClientLeft = 60
ClientTop = 435
ClientWidth = 7095
LinkTopic = "Form3"
ScaleHeight = 4470
ScaleWidth = 7095
StartUpPosition = 3 'Windows Default
Begin VB.TextBox Text5
DataField = "key"
DataSource = "Data1"
Height = 615
Left = 5880
TabIndex = 9
Text = "Text5"
Top = 3000
Visible = 0 'False
Width = 1095
End
Begin VB.TextBox Text4
DataField = "name"
DataSource = "Data1"
Height = 735
Left = 5880
TabIndex = 8
Text = "Text4"
Top = 2040
Visible = 0 'False
Width = 1095
End
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "D:\managepaperluojia\databasemanage\key.mdb"
DefaultCursorType= 0 'DefaultCursor
DefaultType = 2 'UseODBC
Exclusive = 0 'False
Height = 615
Left = 5760
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "key"
Top = 3720
Visible = 0 'False
Width = 1140
End
Begin VB.CommandButton Command2
Caption = "退出"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 2760
TabIndex = 7
Top = 3000
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "修改"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 960
TabIndex = 6
Top = 3000
Width = 1575
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
IMEMode = 3 'DISABLE
Left = 2280
PasswordChar = "*"
TabIndex = 5
Top = 1920
Width = 2775
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
IMEMode = 3 'DISABLE
Left = 2280
PasswordChar = "*"
TabIndex = 3
Top = 1200
Width = 2775
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 2280
TabIndex = 1
Top = 480
Width = 2775
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "请确认新密码:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 4
Top = 2040
Width = 1935
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "请输入新密码:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 2
Top = 1320
Width = 1815
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "请输入新用户名:"
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 0
Top = 600
Width = 1815
End
End
Attribute VB_Name = "Form3"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If (Text1.Text = "") Then
MsgBox "请输入新用户名", 0, "输入错误"
Text1.SetFocus
ElseIf (Text2.Text = "") Then
MsgBox "请输入新密码", 0, "输入错误"
Text2.SetFocus
ElseIf (Text3.Text = "") Then
MsgBox "请确认新密码", 0, "输入错误"
Text3.SetFocus
ElseIf (Text2.Text <> Text3.Text) Then
MsgBox "两次密码输入不同,请重新输入", 0, "输入错误"
Text2.Text = ""
Text3.Text = ""
Text2.SetFocus
Else
'修改用户名和密码
Data1.Recordset.MoveFirst
Text4.Text = Text1.Text
Text5.Text = Text2.Text
Data1.UpdateRecord
MsgBox "用户名和密码修改成功", 0, "提示成功"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
End If
End Sub
Private Sub Command2_Click()
Me.Hide
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -