frmcheck.frm
来自「这是我做得图书馆管理系统!完整版!也有前辈得精华!如果有版权问题其联系我!我删除」· FRM 代码 · 共 178 行
FRM
178 行
VERSION 5.00
Begin VB.Form frmcheck
Caption = "Form1"
ClientHeight = 9075
ClientLeft = 60
ClientTop = 450
ClientWidth = 13200
LinkTopic = "Form1"
Picture = "frmcheck.frx":0000
ScaleHeight = 9075
ScaleWidth = 13200
StartUpPosition = 3 '窗口缺省
Begin VB.TextBox Text2
BackColor = &H00FFC0C0&
Height = 375
IMEMode = 3 'DISABLE
Left = 3600
PasswordChar = "*"
TabIndex = 4
Top = 3120
Width = 2295
End
Begin VB.TextBox Text1
BackColor = &H00FFC0C0&
Height = 375
Left = 3600
TabIndex = 3
Top = 2400
Width = 2295
End
Begin VB.CommandButton Command2
Caption = "关闭"
Height = 375
Left = 4800
Picture = "frmcheck.frx":69235
Style = 1 'Graphical
TabIndex = 2
Top = 4080
Width = 975
End
Begin VB.CommandButton Command1
Caption = "登陆"
Height = 375
Left = 3240
Picture = "frmcheck.frx":6B520
Style = 1 'Graphical
TabIndex = 1
Top = 4080
Width = 975
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = " 密码:"
Height = 375
Left = 2640
TabIndex = 6
Top = 3240
Width = 855
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用户名:"
Height = 375
Left = 2640
TabIndex = 5
Top = 2520
Width = 855
End
Begin VB.Label Label3
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "图书馆图书管理系统"
BeginProperty Font
Name = "宋体"
Size = 42
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00400040&
Height = 1335
Left = 840
TabIndex = 0
Top = 720
Width = 7695
End
End
Attribute VB_Name = "frmcheck"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "请填写用户名!", vbInformation + vbOKOnly, "警告"
Text1.SetFocus
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "请填写密码!", vbInformation + vbOKOnly, "警告"
Text2.SetFocus
Exit Sub
End If
g_strsql = "select * from systeminfo where 名称='" & Text1.Text & "' and 密码='" & Text2.Text & "'"
Set g_rs = g_db.OpenRecordset(g_strsql)
If Not g_rs.EOF Then
Text1.Text = g_rs!名称
Text2.Text = g_rs!密码
If g_rs!超级管理员 = True Then
MsgBox "用户:" + Text1.Text + "你当前的身份是超级管理员,登陆时间:" + MDIForm1.StatusBar1.Panels(4).Text + "", vbInformation + vbOKOnly, "登陆信息"
MDIForm1.Show
MDIForm1.mfwork.Enabled = True
MDIForm1.mfadd.Enabled = True
MDIForm1.mfedit.Enabled = True
MDIForm1.mfsysteminfo.Enabled = True
MDIForm1.MDTJ = True
MDIForm1.StatusBar1.Panels(3).Text = "当前操作员:" & Text1.Text & " 登陆身份:超级管理员"
End If
If g_rs!数据库维护员 = True Then
MsgBox "用户:" + Text1.Text + "你当前的身份是数据库维护员,登陆时间:" + MDIForm1.StatusBar1.Panels(4).Text + "", vbInformation + vbOKOnly, "登陆信息"
MDIForm1.Show
MDIForm1.mfadd.Enabled = True
MDIForm1.mfedit.Enabled = True
MDIForm1.mfsysteminfo.Enabled = True
MDIForm1.mfsetadmin.Enabled = False
MDIForm1.MDTJ = True
MDIForm1.StatusBar1.Panels(3).Text = "当前操作员:" & Text1.Text & " 登陆身份:数据库维护员"
End If
If g_rs!图书管理员 = True Then
MsgBox "用户:" + Text1.Text + "你当前的身份是图书管理员,登陆时间:" + MDIForm1.StatusBar1.Panels(4).Text + "", vbInformation + vbOKOnly, "登陆信息"
MDIForm1.mfwork.Enabled = True
MDIForm1.mfedit = True
MDIForm1.StatusBar1.Panels(3).Text = "当前操作员:" & Text1.Text & "登陆身份:图书管理员"
MDIForm1.Show
End If
Text1.Text = ""
Text2.Text = ""
Me.Hide
Else
MsgBox "对不起,你输入的用户和密码不正确,请重新输入!", vbInformation + vbOKOnly, "警告"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End If
Set g_rs = Nothing
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
dbl
End Sub
Private Sub Label3_Click()
End Sub
Private Sub text1_keypress(keyascii As Integer)
If keyascii = "13" Then
Text2.SetFocus
End If
End Sub
Private Sub text2_keypress(keyascii As Integer)
If keyascii = "13" Then
Command1.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?