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

📄 frmlogin.frm

📁 一个用VB+SQL+SERVER+2000写的学生信息管理系统.rar
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 登录 
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   4800
   ClientLeft      =   0
   ClientTop       =   75
   ClientWidth     =   7830
   LinkTopic       =   "Form1"
   ScaleHeight     =   4800
   ScaleWidth      =   7830
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.OptionButton Option3 
      Caption         =   "学生"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   5520
      TabIndex        =   8
      Top             =   3360
      Width           =   1095
   End
   Begin VB.OptionButton Option2 
      Caption         =   "评分员"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4200
      TabIndex        =   7
      Top             =   3360
      Width           =   1095
   End
   Begin VB.OptionButton Option1 
      BackColor       =   &H00C0C000&
      Caption         =   "管理员"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2640
      TabIndex        =   6
      Top             =   3360
      Width           =   1095
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   4920
      TabIndex        =   5
      Top             =   4080
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "登录"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   960
      TabIndex        =   4
      Top             =   4080
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   2640
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   2280
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   2640
      TabIndex        =   2
      Top             =   1680
      Width           =   1575
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   1
      Left            =   0
      Picture         =   "frmlogin.frx":0000
      Stretch         =   -1  'True
      Top             =   0
      Width           =   480
   End
   Begin VB.Label Label1 
      Caption         =   "请选择你的登录身份:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   240
      TabIndex        =   9
      Top             =   3480
      Width           =   2415
   End
   Begin VB.Label lblLabels 
      BackColor       =   &H00E0E0E0&
      BackStyle       =   0  'Transparent
      Caption         =   "密码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   270
      Index           =   1
      Left            =   1200
      TabIndex        =   1
      Top             =   2520
      Width           =   960
   End
   Begin VB.Label lblLabels 
      BackColor       =   &H00E0E0E0&
      BackStyle       =   0  'Transparent
      Caption         =   "账号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   270
      Index           =   0
      Left            =   1200
      TabIndex        =   0
      Top             =   1800
      Width           =   960
   End
   Begin VB.Image Image2 
      Height          =   480
      Left            =   240
      Picture         =   "frmlogin.frx":1982
      Stretch         =   -1  'True
      Top             =   2520
      Width           =   480
   End
   Begin VB.Image Image1 
      Height          =   480
      Index           =   0
      Left            =   240
      Picture         =   "frmlogin.frx":3304
      Stretch         =   -1  'True
      Top             =   1680
      Width           =   480
   End
   Begin VB.Image Image3 
      Height          =   1575
      Left            =   0
      Picture         =   "frmlogin.frx":4C86
      Stretch         =   -1  'True
      Top             =   0
      Width           =   7770
   End
End
Attribute VB_Name = "登录"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim con  As New ADODB.Connection
Dim rs As ADODB.Recordset
Dim i As Integer


Private Sub Command1_Click()
con.Open "provider=sqloledb.1;user id=sa;password=1101;initial catalog=学生信息管理系统"
Set rs = con.Execute("select * from 登录表 where 用户名称='" & Trim(Text1.Text) & "'")

If rs.EOF = True Then
MsgBox "没有此用户,请重新输入用户名", vbExclamation + vbOKOnly, "提示"
'Text1.Text = ""
Text1.SetFocus
Else
If (Trim(rs.Fields(1)) = Trim(Text2.Text)) Then
 主窗体.Show
Else
 MsgBox "密码错误,请重新输入密码", vbExclamation + vbOKOnly, "提示"
' Text2.Text = ""

Text2.SetFocus

End If
End If
i = i + 1
If i = 3 Then
MsgBox "输入次数过多,系统自动关闭", 48, "警告"
End If
Me.Hide
主窗体.Hide
End Sub

Private Sub Form_Load()
i = 1
End Sub

⌨️ 快捷键说明

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