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

📄 frmlogin.frm

📁 这是一个家庭信息管理的小软件!
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form frmLogin 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Login Form"
   ClientHeight    =   2220
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5085
   BeginProperty Font 
      Name            =   "Times New Roman"
      Size            =   9
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmLogin.frx":0000
   LinkTopic       =   "frmLogin"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   2220
   ScaleWidth      =   5085
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton exitBtn 
      Caption         =   "E&xit"
      Height          =   300
      Left            =   120
      TabIndex        =   5
      ToolTipText     =   " Exit "
      Top             =   1560
      Width           =   975
   End
   Begin VB.Frame Frame1 
      Height          =   1455
      Left            =   10
      TabIndex        =   6
      Top             =   0
      Width           =   5055
      Begin VB.CommandButton btnClear 
         Caption         =   "&Clear"
         Height          =   310
         Left            =   3600
         TabIndex        =   4
         ToolTipText     =   " Clear Entries "
         Top             =   840
         Width           =   1215
      End
      Begin VB.ComboBox AccLevel 
         Height          =   345
         Left            =   1320
         Style           =   2  'Dropdown List
         TabIndex        =   2
         Top             =   960
         Width           =   1935
      End
      Begin VB.TextBox PWORD 
         Height          =   285
         IMEMode         =   3  'DISABLE
         Left            =   1320
         MaxLength       =   20
         PasswordChar    =   "*"
         TabIndex        =   1
         Text            =   "01234567890123456789"
         Top             =   600
         Width           =   1935
      End
      Begin VB.CommandButton btnLogin 
         Caption         =   "&Login"
         Height          =   310
         Left            =   3600
         TabIndex        =   3
         Tag             =   " Login "
         ToolTipText     =   " Login "
         Top             =   360
         Width           =   1215
      End
      Begin VB.TextBox LOGNAME 
         Height          =   285
         Left            =   1320
         MaxLength       =   20
         TabIndex        =   0
         Text            =   "01234567890123456789"
         Top             =   240
         Width           =   1935
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "Access Level"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   9
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   225
         Left            =   200
         TabIndex        =   9
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label2 
         Caption         =   "Password"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   9
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   255
         Left            =   200
         TabIndex        =   8
         Top             =   660
         Width           =   855
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "Login Name"
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   9
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   225
         Left            =   200
         TabIndex        =   7
         Top             =   285
         Width           =   960
      End
   End
   Begin ComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   315
      Left            =   0
      TabIndex        =   10
      Top             =   1905
      Width           =   5085
      _ExtentX        =   8969
      _ExtentY        =   556
      SimpleText      =   ""
      _Version        =   327682
      BeginProperty Panels {0713E89E-850A-101B-AFC0-4210102A8DA7} 
         NumPanels       =   3
         BeginProperty Panel1 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            AutoSize        =   1
            Object.Width           =   5698
            MinWidth        =   5645
            Text            =   "Caption"
            TextSave        =   "Caption"
            Key             =   "capt"
            Object.Tag             =   ""
            Object.ToolTipText     =   "Caption"
         EndProperty
         BeginProperty Panel2 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Style           =   6
            Alignment       =   1
            Object.Width           =   1587
            MinWidth        =   1587
            TextSave        =   "1/31/00"
            Key             =   "dt"
            Object.Tag             =   ""
            Object.ToolTipText     =   " Current Date "
         EndProperty
         BeginProperty Panel3 {0713E89F-850A-101B-AFC0-4210102A8DA7} 
            Style           =   5
            Alignment       =   2
            Object.Width           =   1587
            MinWidth        =   1587
            TextSave        =   "1:10 PM"
            Key             =   "time"
            Object.Tag             =   ""
            Object.ToolTipText     =   " Current Time "
         EndProperty
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "Times New Roman"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'**********************************************************************
'To God Be The Glory
'**********************************************************************
Option Explicit
  Dim Login_Attempts As Integer


'**********************************************************************
'**********************************************************************
Private Sub AccLevel_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
     Call btnLogin_Click
  End If
End Sub
'**********************************************************************
'**********************************************************************


'**********************************************************************
'**********************************************************************
Private Sub btnClear_Click()
  LOGNAME.Text = ""
  PWORD.Text = ""
  AccLevel.Clear
  AccLevel.AddItem "Administrator"
  AccLevel.AddItem "User"
  AccLevel.ListIndex = 0
  LOGNAME.SetFocus
End Sub
'**********************************************************************
'**********************************************************************


'**********************************************************************
'**********************************************************************
Private Sub btnClear_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  StatusBar1.Panels(1).Text = "Clear Entries"
End Sub
'**********************************************************************
'**********************************************************************


'**********************************************************************
'**********************************************************************
Private Sub btnLogin_Click()
  Dim Record_Found As Boolean
  Dim LoginDatabase As Database
  Dim LoginRecordset As Recordset
  On Error GoTo LoginErr
 
 'Check For Apostrophes
  If (InStr(LOGNAME.Text, Chr$(39)) > 0) Then
     MsgBox " Please Remove the Apostrophe(/s) [" & Chr$(34) & "] from the Login Name field", vbInformation + vbOKOnly
     Exit Sub
    Else
     If (InStr(PWORD.Text, Chr$(39)) > 0) Then
        MsgBox " Please Remove the Apostrophe(/s) [" & Chr$(34) & "] from the Password field", vbInformation + vbOKOnly
        Exit Sub
     End If
  End If
  
 'Check For Quotes
  If (InStr(LOGNAME.Text, Chr$(34)) > 0) Then
     MsgBox " Please Remove the Quote(/s) [" & Chr$(34) & "] from the Login Name field", vbInformation + vbOKOnly
     Exit Sub
    Else
     If (InStr(PWORD.Text, Chr$(34)) > 0) Then
        MsgBox " Please Remove the Quote(/s) [" & Chr$(34) & "] from the Password field", vbInformation + vbOKOnly
        Exit Sub

⌨️ 快捷键说明

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