📄 main_xtgl_czygl.frm
字号:
VERSION 5.00
Begin VB.Form main_xtgl_czygl
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Dialog
Caption = "系统管理——【操作员管理】"
ClientHeight = 3105
ClientLeft = 45
ClientTop = 330
ClientWidth = 6585
Icon = "main_xtgl_czygl.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3105
ScaleWidth = 6585
ShowInTaskbar = 0 'False
StartUpPosition = 1 '所有者中心
Begin VB.CommandButton Command3
BackColor = &H00C0C0C0&
Caption = "取消"
Height = 375
Left = 2550
Style = 1 'Graphical
TabIndex = 7
Top = 2550
Width = 1575
End
Begin VB.CommandButton Command1
BackColor = &H00C0C0C0&
Caption = "确定"
Height = 375
Left = 780
Style = 1 'Graphical
TabIndex = 6
Top = 2550
Width = 1575
End
Begin VB.CommandButton Command2
BackColor = &H00C0C0C0&
Caption = "退出"
Height = 375
Left = 4305
Style = 1 'Graphical
TabIndex = 5
Top = 2550
Width = 1575
End
Begin VB.Frame Frame1
Height = 2340
Left = 180
TabIndex = 0
Top = 75
Width = 6240
Begin VB.TextBox Text1
BackColor = &H00FFFFFF&
Height = 345
Left = 2010
TabIndex = 2
Top = 975
Width = 2880
End
Begin VB.TextBox Text2
BackColor = &H00FFFFFF&
Height = 345
IMEMode = 3 'DISABLE
Left = 2010
MaxLength = 6
TabIndex = 1
Top = 1530
Width = 2880
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "请输入操作员代号和密码"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Left = 150
TabIndex = 4
Top = 210
Width = 5100
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "操作员 密 码 "
Height = 960
Left = 1395
TabIndex = 3
Top = 1080
Width = 1005
End
End
End
Attribute VB_Name = "main_xtgl_czygl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mydb1 As Database '定义数据库
Dim rs1 As Recordset '定义数据集对象
Private Sub Form_Activate()
Text1.SetFocus 'text1获得焦点
End Sub
Private Sub Form_Unload(Cancel As Integer)
frm_main.Enabled = True
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Text2.SetFocus
End Sub
Private Sub text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Command1.SetFocus
End Sub
Private Sub Command1_Click()
'新增操作员及密码
Set mydb1 = Workspaces(0).OpenDatabase(App.Path & "\zbjxc.mdb")
Set rs1 = mydb1.OpenRecordset("ma", dbOpenTable)
If Text1.Text <> "" Then
rs1.AddNew
rs1.Fields("操作员") = Text1.Text
rs1.Fields("密码") = Text2.Text
rs1.Update
MsgBox ("操作员设置成功!")
Else
MsgBox ("请输入操作员!")
End If
End Sub
Private Sub Command2_Click()
frm_main.Enabled = True
Unload Me
End Sub
Private Sub Command3_Click()
Text1.Text = "": Text2.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -