⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmcheck.frm

📁 图书馆管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmcheck 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "登陆"
   ClientHeight    =   2730
   ClientLeft      =   6150
   ClientTop       =   3165
   ClientWidth     =   4425
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmcheck.frx":0000
   ScaleHeight     =   2730
   ScaleWidth      =   4425
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox Text2 
      BackColor       =   &H00FFC0C0&
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   1440
      Width           =   2295
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00FFC0C0&
      Height          =   375
      Left            =   1440
      TabIndex        =   0
      Top             =   840
      Width           =   2295
   End
   Begin VB.CommandButton Command2 
      Caption         =   "关闭"
      Height          =   375
      Left            =   3360
      Picture         =   "frmcheck.frx":2B3F2
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   2160
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "登陆"
      Height          =   375
      Left            =   2280
      Picture         =   "frmcheck.frx":2D6DD
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   2160
      Width           =   975
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "  密码:"
      Height          =   375
      Left            =   600
      TabIndex        =   6
      Top             =   1560
      Width           =   855
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "用户名:"
      Height          =   375
      Left            =   600
      TabIndex        =   5
      Top             =   960
      Width           =   855
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "图书馆图书管理系统"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00400040&
      Height          =   495
      Left            =   120
      TabIndex        =   4
      Top             =   120
      Width           =   4215
   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.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.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 & "登陆身份:图书管理员"
      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 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -