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

📄 frmlogin.frm

📁 学生信息系统 采用VB作为程序设计语言 SQL SERVER2000为数据库
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmLogin 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "登录"
   ClientHeight    =   2070
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3660
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2070
   ScaleWidth      =   3660
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "关闭"
      Height          =   345
      Left            =   2085
      TabIndex        =   7
      Top             =   1560
      Width           =   1080
   End
   Begin VB.CommandButton Command1 
      Caption         =   "登录"
      Height          =   345
      Left            =   675
      TabIndex        =   6
      Top             =   1590
      Width           =   1080
   End
   Begin VB.TextBox Text2 
      Height          =   285
      IMEMode         =   3  'DISABLE
      Left            =   1200
      PasswordChar    =   "*"
      TabIndex        =   5
      Top             =   1110
      Width           =   2025
   End
   Begin VB.TextBox Text1 
      Height          =   285
      Left            =   1200
      TabIndex        =   4
      Top             =   720
      Width           =   2025
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "frmLogin.frx":0000
      Left            =   1230
      List            =   "frmLogin.frx":000A
      Style           =   2  'Dropdown List
      TabIndex        =   1
      Top             =   255
      Width           =   1500
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "密码:"
      Height          =   180
      Left            =   675
      TabIndex        =   3
      Top             =   1155
      Width           =   540
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "用户名:"
      Height          =   180
      Left            =   495
      TabIndex        =   2
      Top             =   735
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "登录类型:"
      Height          =   180
      Left            =   315
      TabIndex        =   0
      Top             =   315
      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 Command1_Click()
Dim rec As New ADODB.Recordset
rec.Open "select * from [tblUsers] where Name='" & Text1 & "' and password='" & Text2 & "' and right=" & Combo1.ListIndex, Con
If rec.BOF Or rec.EOF Then
    MsgBox "输入的用户名或密码错误,也可能是登录类型错误!"
    Text2 = ""
    Text1.ShowWhatsThis
    SendKeys "{Home}+{End}"
Else
    UserRight = Combo1.ListIndex
    Hide
End If
End Sub

Private Sub Command2_Click()
End
End Sub

Private Sub Form_Load()
Set Icon = Nothing
Combo1.ListIndex = 0
End Sub

Private Sub Form_Unload(Cancel As Integer)
End
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
    Text2.SetFocus
    SendKeys "{Home}+{End}"
End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
    Command1_Click
End If
End Sub

⌨️ 快捷键说明

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