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

📄 login.frm

📁 一个简单的酒店管理系统 用VB.net+SQL2000实现
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmlogin 
   Caption         =   "Form1"
   ClientHeight    =   1515
   ClientLeft      =   2850
   ClientTop       =   3495
   ClientWidth     =   3720
   LinkTopic       =   "Form1"
   Moveable        =   0   'False
   ScaleHeight     =   1515
   ScaleWidth      =   3720
   Begin VB.TextBox txtPassword 
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1305
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   510
      Width           =   2325
   End
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消"
      Height          =   390
      Left            =   2115
      TabIndex        =   2
      Top             =   1005
      Width           =   1140
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   390
      Left            =   510
      TabIndex        =   1
      Top             =   1005
      Width           =   1140
   End
   Begin VB.TextBox txtUserName 
      Height          =   345
      Left            =   1305
      TabIndex        =   0
      Top             =   120
      Width           =   2325
   End
   Begin VB.Label lblLabels 
      AutoSize        =   -1  'True
      Caption         =   "密码(&P):"
      Height          =   180
      Index           =   1
      Left            =   120
      TabIndex        =   5
      Top             =   525
      Width           =   720
   End
   Begin VB.Label lblLabels 
      AutoSize        =   -1  'True
      Caption         =   "用户名(&U):"
      Height          =   180
      Index           =   0
      Left            =   120
      TabIndex        =   4
      Top             =   135
      Width           =   900
   End
End
Attribute VB_Name = "frmlogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Private Sub cmdCancel_Click()
    '设置全局变量为 false,指示登录失败
    LoginSucceeded = False
    Unload Me
End Sub

Private Sub cmdOK_Click()
    '检查密码的正确性
    If txtPassword = "" Then
        '此处放置代码给调用子程序传递成功信息
        '设置全局变量是最简单的
        LoginSucceeded = True
'测试数据
        SYS_GWMC = "营销部"
        SYS_GWDM = "YXB"
        SYS_USER = "000"
        SYS_NAME = "123"
        SYS_RIGHT = "4"
        
        Unload Me
    Else
        MsgBox "无效的密码,再试一次!", , "登录"
        txtPassword.SetFocus
        SendKeys "{Home}+{End}"
    End If
End Sub


Private Sub Form_Load()
    frmlogin.Caption = "登录"
End Sub

⌨️ 快捷键说明

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