📄 用户管理.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form6
BorderStyle = 0 'None
Caption = "Form6"
ClientHeight = 3390
ClientLeft = 6210
ClientTop = 4485
ClientWidth = 3675
ForeColor = &H00000000&
LinkTopic = "Form6"
ScaleHeight = 32750.35
ScaleMode = 0 'User
ScaleWidth = 38058.05
ShowInTaskbar = 0 'False
Begin VB.CommandButton Command1
BackColor = &H00FFFF80&
Caption = "登陆"
Default = -1 'True
Height = 350
Left = 960
MaskColor = &H8000000F&
Picture = "用户管理.frx":0000
Style = 1 'Graphical
TabIndex = 7
Top = 2280
Width = 765
End
Begin VB.CommandButton cancle
BackColor = &H00FFFF80&
Caption = "退出"
Height = 350
Left = 1920
MaskColor = &H8000000F&
Picture = "用户管理.frx":1FDE2
Style = 1 'Graphical
TabIndex = 6
Top = 2280
Width = 765
End
Begin VB.TextBox Text3
DataField = "usernum"
DataSource = "Adodc1"
Height = 270
Left = 4560
TabIndex = 2
Text = "Text3"
Top = 240
Visible = 0 'False
Width = 615
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 120
Top = 2640
Visible = 0 'False
Width = 3120
_ExtentX = 5503
_ExtentY = 661
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\wangyufei\VB编程\050305\管理员.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\wangyufei\VB编程\050305\管理员.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "表1"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 1320
PasswordChar = "*"
TabIndex = 1
Top = 1680
Width = 1815
End
Begin VB.TextBox Text1
ForeColor = &H00000000&
Height = 375
Left = 1320
TabIndex = 0
Top = 1200
Width = 1815
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "管理员编号:"
ForeColor = &H8000000D&
Height = 375
Left = 240
TabIndex = 5
Top = 1320
Width = 1095
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "密码:"
ForeColor = &H8000000D&
Height = 255
Left = 720
TabIndex = 4
Top = 1800
Width = 735
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "管理员登陆"
ForeColor = &H8000000D&
Height = 255
Index = 1
Left = 840
TabIndex = 3
Top = 840
Width = 1215
End
Begin VB.Image Image1
Height = 3390
Left = 0
Picture = "用户管理.frx":3FBC4
Top = 0
Width = 3660
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim tt As Integer
Private Sub cancle_Click()
Unload Me
End Sub
Private Sub Command1_Click()
If Text1.Text = "" Or Text2.Text = "" Then
MsgBox "用户名或密码不能为空!", vbCritical, "登陆"
Else
tt = 0
Adodc1.Recordset.MoveFirst
Do While Not Adodc1.Recordset.EOF
If Adodc1.Recordset.Fields("usernum") = Text1.Text Then
If Adodc1.Recordset.Fields("password") = Text2.Text Then
tt = tt + 1
main.Enabled = True
Unload Me
main.admin.Enabled = True
main.load.Enabled = False
main.update.Enabled = True
main.newusers.Enabled = True
main.back.Enabled = True
main.查询修改.Enabled = True
End If
Else
End If
Adodc1.Recordset.MoveNext
Loop
If tt = 0 Then
Text1.Text = ""
Text2.Text = ""
MsgBox "管理员名或密码错误!", vbCritical, "登陆"
End If
End If
'
main.查询修改.Enabled = True
'
End Sub
Private Sub Command2_Click()
If Text1.Text = "1" And Text2.Text = "1" Then
Form8.Show
Unload Form6
Else
MsgBox "用户名或密码错误!", vbCritical, "错误"
Text1.Text = ""
Text2.Text = ""
End If
End Sub
Private Sub Command3_Click()
frm仪表.Show
End Sub
Private Sub Command4_Click()
Form10.Show
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -