📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "用户管理界面"
ClientHeight = 3375
ClientLeft = 60
ClientTop = 450
ClientWidth = 4935
Icon = "Form1.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
Picture = "Form1.frx":0442
ScaleHeight = 3375
ScaleWidth = 4935
Begin VB.TextBox TxtType
Height = 345
IMEMode = 3 'DISABLE
Left = 1800
TabIndex = 7
Top = 2040
Width = 2325
End
Begin VB.TextBox txtPassword
Height = 345
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 3
Top = 1590
Width = 2325
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取消"
Height = 390
Left = 3030
TabIndex = 2
Top = 2745
Width = 1140
End
Begin VB.CommandButton cmdOK
Caption = "确定"
Default = -1 'True
Height = 390
Left = 1680
TabIndex = 1
Top = 2760
Width = 1140
End
Begin VB.TextBox txtUserName
Height = 345
Left = 1800
TabIndex = 0
Top = 1200
Width = 2325
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "添加用户"
BeginProperty Font
Name = "隶书"
Size = 26.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1320
TabIndex = 8
Top = 240
Width = 2655
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用户类型:"
Height = 375
Left = 720
TabIndex = 6
Top = 2040
Width = 975
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "密码(&P):"
Height = 270
Index = 1
Left = 840
TabIndex = 5
Top = 1605
Width = 1080
End
Begin VB.Label lblLabels
BackStyle = 0 'Transparent
Caption = "用户名称(&U):"
Height = 270
Index = 0
Left = 615
TabIndex = 4
Top = 1215
Width = 1080
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
If txtUserName = "" Or txtPassword = "" Or TxtType = "" Then
MsgBox "数据输入不完整,请补充完整", vbCritical, "警告"
txtUserName.SetFocus
Exit Sub
End If
Dim rs3 As ADODB.Recordset
Set rs3 = New ADODB.Recordset
Call lj
rs3.Open "select * from 管理人员信息表", conn, adOpenDynamic, adLockOptimistic
rs3.AddNew
rs3(0) = txtUserName
rs3(1) = txtPassword
rs3(2) = TxtType
rs3.Update
txtUserName = ""
txtPassword = ""
TxtType = ""
txtUserName.SetFocus
MsgBox "用户添加成功", vbMsgBoxRight, "恭喜"
End Sub
Private Sub Form_Load()
Form1.Height = 3780
Form1.Width = 5055
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -