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

📄 frmlogin.frm

📁 用VB软件实现的一些常用的矩阵运算
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmLogin 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Login"
   ClientHeight    =   6750
   ClientLeft      =   2835
   ClientTop       =   3480
   ClientWidth     =   9015
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmLogin.frx":0000
   ScaleHeight     =   3988.122
   ScaleMode       =   0  'User
   ScaleWidth      =   8464.597
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox txtUserName 
      Height          =   345
      Left            =   3810
      TabIndex        =   1
      Text            =   "admin"
      Top             =   4095
      Width           =   2325
   End
   Begin VB.CommandButton cmdOK 
      BackColor       =   &H00008000&
      Caption         =   "OK"
      Default         =   -1  'True
      Height          =   390
      Left            =   3015
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   4980
      Width           =   1140
   End
   Begin VB.CommandButton cmdCancel 
      BackColor       =   &H00008000&
      Cancel          =   -1  'True
      Caption         =   "Cancel"
      Height          =   390
      Left            =   4620
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   4980
      Width           =   1140
   End
   Begin VB.TextBox txtPassword 
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   3810
      PasswordChar    =   "*"
      TabIndex        =   3
      Text            =   "admin"
      Top             =   4485
      Width           =   2325
   End
   Begin VB.Label lblLabels 
      BackColor       =   &H00008000&
      Caption         =   "&User Name:"
      Height          =   270
      Index           =   0
      Left            =   2640
      TabIndex        =   0
      Top             =   4110
      Width           =   1080
   End
   Begin VB.Label lblLabels 
      BackColor       =   &H00008000&
      Caption         =   "&Password:"
      Height          =   270
      Index           =   1
      Left            =   2640
      TabIndex        =   2
      Top             =   4500
      Width           =   1080
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public LoginSucceeded As Boolean

Private Sub cmdCancel_Click()
    'set the global var to false
    'to denote a failed login
    LoginSucceeded = False
    Me.Hide
End Sub

Private Sub cmdOK_Click()
    'check for correct password
    
    If txtPassword = "admin" And txtUserName = "admin" Then
        'place code to here to pass the
        'success to the calling sub
        'setting a global var is the easiest
        LoginSucceeded = True
        Me.Hide
        Form1.Show
    Else
        MsgBox "Invalid Password, try again!", , "Login"
        txtPassword.SetFocus
        SendKeys "{Home}+{End}"
    End If
End Sub

⌨️ 快捷键说明

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