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

📄 登陆窗口.frm

📁 一个学生管理系统。较为完整
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Begin VB.Form Form1 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Form1"
   ClientHeight    =   3570
   ClientLeft      =   3930
   ClientTop       =   3045
   ClientWidth     =   5370
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3570
   ScaleWidth      =   5370
   Begin VB.TextBox Text4 
      Height          =   495
      Left            =   5520
      TabIndex        =   12
      Top             =   1200
      Width           =   2535
   End
   Begin VB.TextBox Text3 
      Height          =   495
      Left            =   5520
      TabIndex        =   11
      Top             =   480
      Width           =   2535
   End
   Begin VB.ComboBox Combo2 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Left            =   5520
      TabIndex        =   10
      Text            =   "Combo2"
      Top             =   2040
      Width           =   2535
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   735
      Left            =   2520
      Top             =   3600
      Visible         =   0   'False
      Width           =   2655
      _ExtentX        =   4683
      _ExtentY        =   1296
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.ComboBox Combo1 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   420
      Left            =   1440
      Style           =   2  'Dropdown List
      TabIndex        =   7
      Top             =   2040
      Width           =   2535
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   495
      Left            =   3360
      TabIndex        =   6
      Top             =   2880
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   495
      Left            =   960
      TabIndex        =   5
      Top             =   2880
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   495
      IMEMode         =   3  'DISABLE
      Left            =   1440
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1260
      Width           =   2535
   End
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   1440
      TabIndex        =   1
      Top             =   480
      Width           =   2535
   End
   Begin VB.Label Label5 
      Alignment       =   2  'Center
      BorderStyle     =   1  'Fixed Single
      Caption         =   "注册"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   4200
      TabIndex        =   9
      Top             =   2040
      Width           =   615
   End
   Begin VB.Label Label4 
      Caption         =   "如果您尚未注册用户,请点击注册。"
      ForeColor       =   &H000000C0&
      Height          =   1935
      Left            =   4200
      TabIndex        =   8
      Top             =   480
      Width           =   615
   End
   Begin VB.Label Label3 
      Caption         =   "类型:"
      Height          =   495
      Left            =   600
      TabIndex        =   4
      Top             =   2160
      Width           =   1455
   End
   Begin VB.Label Label2 
      Caption         =   "密码:"
      Height          =   495
      Left            =   600
      TabIndex        =   2
      Top             =   1440
      Width           =   1455
   End
   Begin VB.Label Label1 
      Caption         =   "用户名:"
      Height          =   495
      Left            =   600
      TabIndex        =   0
      Top             =   600
      Width           =   1455
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.RecordSource = "select * from admin where name='" & Text1.Text & "'"
Adodc1.Refresh
If Text1.Text = "" Or Text2.Text = "" Or Combo1.Text = "" Then
MsgBox "请填写完整!!!"
Else
If Adodc1.Recordset.EOF Then
MsgBox "没有该用户,请重新输入!!!"
Else
Text3.Text = Adodc1.Recordset(1)
Text4.Text = Adodc1.Recordset(2)
Combo2.Text = Adodc1.Recordset(3)

If Text1.Text = Text3.Text And Text2.Text = Text4.Text And Combo1.Text = Combo2.Text Then
Form2.Show
yonghu = Text1.Text
Unload Me

Else
MsgBox "输入的用户不正确,请重新输入!!!"

End If
End If
End If
End Sub

Private Sub Command2_Click()
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus

End Sub

Private Sub Form_Load()
Form1.Caption = "登陆窗口"
Combo1.AddItem "0"
Combo1.AddItem "1"
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\student1.mdb;Persist Security Info=False"
Adodc1.RecordSource = "admin"
Adodc1.Refresh
Text3.Text = Adodc1.Recordset(1)
Text4.Text = Adodc1.Recordset(2)
Combo2.Text = Adodc1.Recordset(3)


End Sub

Private Sub Label5_Click()
Form3.Show

End Sub

⌨️ 快捷键说明

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