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

📄 frmlogin.frm

📁 经过几个月的设计和开发
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmLogin 
   Appearance      =   0  'Flat
   AutoRedraw      =   -1  'True
   BackColor       =   &H80000005&
   BorderStyle     =   0  'None
   Caption         =   "用户登录"
   ClientHeight    =   4965
   ClientLeft      =   4920
   ClientTop       =   2595
   ClientWidth     =   6075
   Icon            =   "frmLogin.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   331
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   405
   ShowInTaskbar   =   0   'False
   Begin 计算机图书管理系统2008.xp_canvas xp_canvas1 
      Height          =   3060
      Left            =   0
      TabIndex        =   4
      Top             =   1200
      Width           =   6135
      _extentx        =   10821
      _extenty        =   5398
      Begin VB.TextBox Text1 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         Left            =   2760
         TabIndex        =   1
         Text            =   "reader"
         Top             =   480
         Width           =   1935
      End
      Begin VB.TextBox Text2 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         IMEMode         =   3  'DISABLE
         Left            =   2760
         PasswordChar    =   "*"
         TabIndex        =   2
         Text            =   "000"
         Top             =   1200
         Width           =   1935
      End
      Begin VB.Frame Frame1 
         BackColor       =   &H00C0FFFF&
         BorderStyle     =   0  'None
         ForeColor       =   &H000000FF&
         Height          =   1935
         Left            =   720
         TabIndex        =   5
         Top             =   0
         Width           =   4575
         Begin VB.Label Label2 
            BackColor       =   &H00C0FFFF&
            Caption         =   "  密  码:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   240
            TabIndex        =   7
            Top             =   1320
            Width           =   1455
         End
         Begin VB.Label Label1 
            BackColor       =   &H00C0FFFF&
            Caption         =   " 用 户 名:"
            BeginProperty Font 
               Name            =   "宋体"
               Size            =   12
               Charset         =   0
               Weight          =   400
               Underline       =   0   'False
               Italic          =   0   'False
               Strikethrough   =   0   'False
            EndProperty
            Height          =   375
            Left            =   240
            TabIndex        =   6
            Top             =   480
            Width           =   1455
         End
      End
      Begin 计算机图书管理系统2008.xpcmdbutton xpcmdbutton2 
         Height          =   495
         Left            =   3360
         TabIndex        =   0
         Top             =   2040
         Width           =   1575
         _extentx        =   2778
         _extenty        =   873
         font            =   "frmLogin.frx":0CCA
      End
      Begin 计算机图书管理系统2008.xpcmdbutton xpcmdbutton1 
         Height          =   495
         Left            =   1200
         TabIndex        =   3
         Top             =   2040
         Width           =   1575
         _extentx        =   2778
         _extenty        =   873
         font            =   "frmLogin.frx":0CEE
      End
   End
   Begin 计算机图书管理系统2008.xptopbuttons xptopbuttons1 
      Height          =   315
      Left            =   5640
      ToolTipText     =   "关闭系统"
      Top             =   120
      Width           =   315
      _extentx        =   556
      _extenty        =   556
   End
   Begin 计算机图书管理系统2008.xptopbuttons xptopbuttons2 
      Height          =   315
      Index           =   1
      Left            =   5280
      Top             =   120
      Width           =   315
      _extentx        =   556
      _extenty        =   556
      value           =   2
   End
   Begin VB.Image Image2 
      Height          =   1545
      Left            =   0
      Picture         =   "frmLogin.frx":0D12
      Top             =   4200
      Width           =   12765
   End
   Begin VB.Image Image1 
      Height          =   1410
      Left            =   0
      Picture         =   "frmLogin.frx":2BAEC
      Top             =   0
      Width           =   7215
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False




Private Sub Form_Load()             '连接用户表
Call open_connection("user_table")
xpcmdbutton1.Caption = "登陆"
xpcmdbutton2.Caption = "注销"
End Sub





Private Sub Image1_Click()

End Sub

Private Sub xpcmdbutton1_Click()     '登录系统
Dim sql As String

If Trim(Text1.Text) = "" Then        '如果文本框为空,则给出提示
  frmMsg.Show
   frmMsg.notice.Visible = True
  frmMsg.Text1.Text = "请输入用户登录账号!"
   Exit Sub
Else
  sql = "select * from user_table where [登录名]='" & Trim(Text1.Text) & "'"   '查找用户登录名
  rst.Close
  rst.Open sql, con, adOpenDynamic, adLockOptimistic
     If rst.RecordCount <= 0 Then
      frmMsg.Show
     frmMsg.error.Visible = True
  frmMsg.Text1.Text = "用户名不存在!"
       Exit Sub
     End If
     '用户合法性检测并赋予一定的权限级别
    If LCase(Trim(rst![登录名])) = LCase(Trim(Text1.Text)) Then
      If Trim(rst![密码]) = Trim(Text2.Text) Then
        privilege = rst![权限]
        Call check_privage(privilege)   '权限分配
       Else
        frmMsg.Show
          frmMsg.error.Visible = True
       frmMsg.Text1.Text = "密码错误,请重新输入!"
        Exit Sub
       End If
   End If
End If
End Sub


 
Private Sub xpcmdbutton2_Click()    '退出系统
End
End Sub

Private Sub xptopbuttons1_Click()
End
End Sub

Private Sub xptopbuttons2_Click(Index As Integer)
Me.WindowState = 1
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -