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

📄 rl_lock.frm

📁 图书管理软件,基本功能已具备
💻 FRM
字号:
VERSION 5.00
Begin VB.Form RL_Lock 
   BorderStyle     =   0  'None
   Caption         =   "挂起"
   ClientHeight    =   2280
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4800
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   Picture         =   "RL_Lock.frx":0000
   ScaleHeight     =   2280
   ScaleWidth      =   4800
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.TextBox txt_Password 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   1980
      PasswordChar    =   "*"
      TabIndex        =   1
      Text            =   "txt_Password"
      Top             =   1605
      Width           =   1665
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "请输入密码"
      Height          =   270
      Left            =   825
      TabIndex        =   0
      Top             =   1650
      Width           =   1995
   End
End
Attribute VB_Name = "RL_Lock"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'***************************************************************
'*公司名:华夏学院晨光网络公司
'*系统名:红杉图书信息管理系统
'*程序名:锁定
'*程序ID:RL_Lock
'*版本:1.0.0
'*最后修改时间:2005/4/3
'*修改人:cuitianlong
'*
'*-------------------------------------------------------------
'*  [年月日]        [制造者]
'*-------------------------------------------------------------
'*  2005/4/3        cuitianlong
'*
'***************************************************************
Option Explicit

Dim rc As New ADODB.Recordset  '定义记录集

'***************************************************************
'*  窗体加载
'*
'*  [参数]
'*      无
'*  [返回]
'*      无
'***************************************************************
Private Sub Form_Load()
    On Error GoTo Form_Load
    
    '--- 窗体居中设置
    Call Cmn_Form_Center(Me)
    '--- 设置各个控件初始值
    txt_Password.text = ""
    
    Exit Sub
Form_Load:
    MsgBox "Form_Load()---出错", vbCritical, "错误"
End Sub

'***************************************************************
'*  OpenLock
'*
'*  [参数]
'*      无
'*  [返回]
'*      无
'***************************************************************
Private Sub OpenLock()
    On Error GoTo OpenLock
        
    Dim S_SQL      As String
    Dim S_UserName As String
    Dim S_Password As String
    
    S_UserName = C_LoginName
    S_Password = txt_Password.text
    
    S_SQL = ""
    S_SQL = S_SQL & " SELECT UserName,UserPassword"
    S_SQL = S_SQL & " FROM T_User"
    S_SQL = S_SQL & " WHERE UserName='" & S_UserName & "'"
    S_SQL = S_SQL & " AND UserPassword='" & S_Password & "'"
 
    Call Cmn_Ado_Select_Nolock(S_SQL, rc)
    
    If rc.RecordCount = 0 Then
        MsgBox "对不起密码不正确", vbInformation, "提示"
        Exit Sub
    Else
        Unload Me
        Exit Sub
    End If
    
    Exit Sub
OpenLock:
    MsgBox "OpenLock()---出错", vbCritical, "错误"
End Sub

'****************************************************************
'*  Form_KeyPress
'*
'*  [参数]
'*      1:系统参数
'*  [返回]
'*      无
'****************************************************************
Private Sub txt_Password_KeyPress(KeyAscii As Integer)
    On Error GoTo txt_Password_KeyPress
    
    If KeyAscii = 13 Then '如果按下的键是回车就调用OpenLock函数
    
        Call OpenLock
        
    End If
    
    Exit Sub
txt_Password_KeyPress:
    MsgBox "txt_Password_KeyPress", vbCritical, "提示"
End Sub

⌨️ 快捷键说明

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