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

📄 pass.frm

📁 图书管理系统 内有13个窗体 (附送代码) 功能包括查询 添加删除 修改
💻 FRM
字号:
VERSION 5.00
Begin VB.Form pass 
   Caption         =   "图书管理系统"
   ClientHeight    =   4155
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5850
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4155
   ScaleWidth      =   5850
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton cmd_cancel 
      Caption         =   "取消"
      Height          =   495
      Left            =   2760
      TabIndex        =   4
      Top             =   3360
      Width           =   1455
   End
   Begin VB.CommandButton cmd_ok 
      Caption         =   "确定"
      Height          =   495
      Left            =   1200
      TabIndex        =   3
      Top             =   3360
      Width           =   1335
   End
   Begin VB.Frame pass 
      Caption         =   "用户登录"
      Height          =   1575
      Left            =   1200
      TabIndex        =   5
      Top             =   1560
      Width           =   3255
      Begin VB.TextBox txtpwd 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1080
         MaxLength       =   6
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   960
         Width           =   1575
      End
      Begin VB.TextBox txtname 
         Height          =   375
         Left            =   1080
         MaxLength       =   10
         TabIndex        =   1
         Top             =   360
         Width           =   1575
      End
      Begin VB.Label Label3 
         Caption         =   "口令"
         Height          =   375
         Left            =   480
         TabIndex        =   7
         Top             =   1080
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "用户名"
         Height          =   375
         Left            =   360
         TabIndex        =   6
         Top             =   480
         Width           =   855
      End
   End
   Begin VB.Label Label1 
      BackColor       =   &H8000000A&
      Caption         =   "   图书管理系统"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   1560
      TabIndex        =   0
      Top             =   600
      Width           =   2655
   End
End
Attribute VB_Name = "pass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public n As Integer

Private Sub cmd_cancel_Click()
Unload Me
End Sub

Private Sub cmd_ok_Click()
Dim rstpass As ADODB.Recordset
txtsql = "select * from oper where 用户名='" & Trim$(txtname.Text) & "'" & "and 口令='" & Trim$(txtpwd.Text) + "'"
Set rstpass = exesql(txtsql)
If rstpass.EOF = True Then
n = n + 1
If n < 3 Then
MsgBox "用户名或口令错误,继续登录", vbOKOnly + vbExclamation, "信息提示"
rstpass.Close
txtname.Text = ""
txtpwd.Text = ""
txtname.SetFocus
Else
MsgBox "已登录失败三次,退出系统", vbOKOnly + vbExclamation, "信息提示"
rstpass.Close
Unload Me
End If
Else '找到用户记录
userlevel = Trim(rstpass.Fields("级别"))
rstpass.Close
Unload Me
menu.Show
End If
End Sub

Private Sub Form_Load()
n = 0
End Sub



Private Sub txtname_KeyPress(KeyAscii As Integer)
Call endata(KeyAscii)
End Sub

Private Sub txtpwd_KeyPress(KeyAscii As Integer)
txtpwd.SelLength = 6
Call endata(KeyAscii)

End Sub

⌨️ 快捷键说明

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