📄 main_administrator.frm
字号:
VERSION 5.00
Begin VB.Form Main_Administrator
AutoRedraw = -1 'True
BorderStyle = 1 'Fixed Single
Caption = "系统管理员"
ClientHeight = 3015
ClientLeft = 45
ClientTop = 330
ClientWidth = 6285
Icon = "Main_Administrator.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "Main_Administrator.frx":000C
ScaleHeight = 3015
ScaleWidth = 6285
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox TxtPassword
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
IMEMode = 3 'DISABLE
Left = 2985
MaxLength = 6
PasswordChar = "*"
TabIndex = 1
Top = 1485
Width = 2925
End
Begin VB.TextBox TxtAdministrator
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2985
TabIndex = 0
Top = 960
Width = 2910
End
Begin VB.Label LblCancel
BackStyle = 0 'Transparent
Height = 570
Left = 4455
TabIndex = 3
Top = 2220
Width = 1635
End
Begin VB.Label LblSave
BackStyle = 0 'Transparent
Height = 570
Left = 2745
TabIndex = 2
Top = 2220
Width = 1635
End
End
Attribute VB_Name = "Main_Administrator"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub lblSave_Click()
Dim rs As New ADODB.Recordset
If TxtAdministrator.Text = "" Then
MsgBox "系统不允许【系统管理员】为空!"
Exit Sub
End If
If TxtPassword.Text = "" Then
MsgBox "系统不允许【密码】为空!"
Exit Sub
End If
rs.Open "select * from 系统管理员表", cnn, adOpenKeyset, adLockOptimistic
rs.AddNew
rs.Fields("系统管理员") = TxtAdministrator.Text
rs.Fields("密码") = TxtPassword.Text
rs.Update
MsgBox "数据保存成功!"
End Sub
Private Sub lblCancel_Click()
Frm_Main.Show
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -