📄 moduser.frm
字号:
VERSION 5.00
Begin VB.Form moduser
Caption = "Form1"
ClientHeight = 3075
ClientLeft = 3855
ClientTop = 3930
ClientWidth = 7455
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 3075
ScaleWidth = 7455
Begin VB.Frame Frame2
Height = 2655
Left = 120
TabIndex = 4
Top = 120
Width = 4935
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
IMEMode = 3 'DISABLE
Left = 2040
PasswordChar = "*"
TabIndex = 7
Top = 360
Width = 2415
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
IMEMode = 3 'DISABLE
Left = 2040
PasswordChar = "*"
TabIndex = 6
Top = 1200
Width = 2415
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FF0000&
Height = 495
IMEMode = 3 'DISABLE
Left = 2040
PasswordChar = "*"
TabIndex = 5
Top = 1920
Width = 2415
End
Begin VB.Label Label1
Caption = "旧密码"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 360
TabIndex = 10
Top = 480
Width = 1335
End
Begin VB.Label Label2
Caption = "输入新密码"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 360
TabIndex = 9
Top = 1200
Width = 1335
End
Begin VB.Label Label3
Caption = "验证新密码"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 360
TabIndex = 8
Top = 1920
Width = 1455
End
End
Begin VB.Frame Frame1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2655
Left = 5400
TabIndex = 0
Top = 120
Width = 1455
Begin VB.CommandButton Command3
Caption = "关闭(&C)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 120
TabIndex = 3
Top = 1920
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "取消(&E)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 120
TabIndex = 2
Top = 1080
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "确定(&O)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 120
TabIndex = 1
Top = 240
Width = 1215
End
End
End
Attribute VB_Name = "moduser"
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 "请输入旧密码!", vbOKOnly, "提示!"
Else
txtSQL = "select * from user where 密码 = '" & Trim(Text1.Text) & " '"
Set dream = ExecuteSQL(txtSQL, Msgtext)
If Trim(Text2.Text) <> Trim(Text3.Text) Then
MsgBox "密码验证失败!", 48, "警告"
Text2.SetFocus
Text3.Text = ""
Text2.Text = ""
Else
txtSQL = txtSQL & " order by 密码 "
txtSQL = "select * from user where 密码 ='" & Trim(Text1.Text) & "'"
Set dream = ExecuteSQL(txtSQL, Msgtext)
dream.Fields(1) = Text2.Text
dream.Update
dream.Close
MsgBox "密码修改成功!", 48, "修改密码"
Me.Hide
' MsgBox "旧密码输入错误!", vbOKOnly, "提示"
' Text1.Text = ""
' Text2.Text = ""
' Text3.Text = ""
'Text1.SetFocus
End If
End If
End Sub
Private Sub Command3_Click()
studentmdi.StatusBar1.Panels.Item(1).Text = " "
Unload Me
End Sub
Private Sub Form_Load()
moduser.Height = 3480
moduser.Width = 7575
moduser.Caption = "用户信息[" + Format(Date, "yyyy年mm月dd日]")
studentmdi.StatusBar1.Panels.Item(1).Text = "修改用户密码"
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Call Command1_Click
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -