📄 adminmsg.frm
字号:
VERSION 5.00
Begin VB.Form adminmsg
BorderStyle = 1 'Fixed Single
Caption = "管理员平台"
ClientHeight = 3105
ClientLeft = 45
ClientTop = 330
ClientWidth = 6105
LinkTopic = "Form2"
MaxButton = 0 'False
MDIChild = -1 'True
Picture = "adminmsg.frx":0000
ScaleHeight = 3105
ScaleWidth = 6105
Begin VB.CommandButton Command5
Caption = "图书信息"
Height = 375
Left = 3600
Picture = "adminmsg.frx":9C09
Style = 1 'Graphical
TabIndex = 8
Top = 2280
Width = 1095
End
Begin VB.CommandButton Command4
Caption = "查找用户"
Height = 375
Left = 1560
Picture = "adminmsg.frx":C469
Style = 1 'Graphical
TabIndex = 7
Top = 2280
Width = 975
End
Begin VB.CommandButton Command3
Caption = "保存修改"
Height = 375
Left = 1560
Picture = "adminmsg.frx":ECC9
Style = 1 'Graphical
TabIndex = 6
Top = 1560
Width = 975
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 270
Index = 1
Left = 4080
TabIndex = 5
Text = "Text1"
Top = 480
Width = 1215
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00E0E0E0&
Height = 270
Index = 0
Left = 1560
TabIndex = 4
Text = "Text1"
Top = 480
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 3600
Picture = "adminmsg.frx":11529
Style = 1 'Graphical
TabIndex = 1
Top = 1560
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "修改信息"
Height = 375
Left = 1560
Style = 1 'Graphical
TabIndex = 0
Top = 1560
Width = 975
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密码"
Height = 180
Index = 1
Left = 3360
TabIndex = 3
Top = 480
Width = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户名"
Height = 180
Index = 0
Left = 240
TabIndex = 2
Top = 480
Width = 540
End
End
Attribute VB_Name = "adminmsg"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Text1(0).Locked = False
Text1(1).Locked = False
Command3.Visible = True
Command1.Visible = False
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Command3_Click()
Dim sql As String
Dim i As Integer
If Text1(0).Text = "" Or Text1(1).Text = "" Then
MsgBox "您填写的信息为空!", 64, "提示"
Text1(0).SetFocus
Exit Sub
End If
If Text1(0).Text <> "" And Text1(1).Text <> "" Then
sql = "select * from person where username='" & username & "' and password='" & password & "'"
opendb sql, "2"
username = Replace(Trim(Text1(0).Text), "'", "''")
password = Replace(Trim(Text1(1).Text), "'", "''")
rs("username") = username
rs("password") = password
rs.Update
closedb
Me.Hide
MsgBox "信息修改成功", 64, "提示"
Text1(0).Locked = True
Text1(1).Locked = True
Me.Show
Command1.Visible = True
Command3.Visible = False
End If
End Sub
Private Sub Command4_Click()
edituser.Show
End Sub
Private Sub Command5_Click()
editbook.Show
End Sub
Private Sub Form_Load()
Dim sql As String
Dim i As Integer
Text1(0).Locked = True
Text1(1).Locked = True
Command3.Visible = False
sql = "select username,password from person where username='" & username & "' and password='" & password & "'"
opendb sql, ""
For i = 0 To 1
Text1(i).Text = rs(i)
Next
closedb
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -