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

📄 frmlogin.frm

📁 这个一个用VB写的车辆管理系统论文
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmLogin 
   BackColor       =   &H8000000A&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "系统登录"
   ClientHeight    =   2205
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5325
   Icon            =   "frmLogin.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmLogin.frx":0442
   ScaleHeight     =   2205
   ScaleWidth      =   5325
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text3 
      DataField       =   "用户姓名"
      DataSource      =   "Adodc1"
      Height          =   285
      Left            =   270
      TabIndex        =   9
      Top             =   390
      Visible         =   0   'False
      Width           =   1395
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00FFC0C0&
      Height          =   1980
      Left            =   2175
      TabIndex        =   0
      Top             =   105
      Width           =   2985
      Begin VB.CommandButton Command2 
         BackColor       =   &H00FFFFFF&
         Caption         =   "退 出(&E)"
         Height          =   315
         Left            =   1500
         Style           =   1  'Graphical
         TabIndex        =   5
         Top             =   1500
         Width           =   1215
      End
      Begin VB.CommandButton Command1 
         BackColor       =   &H00FFFFFF&
         Caption         =   "登 录(&L)"
         Height          =   315
         Left            =   195
         Style           =   1  'Graphical
         TabIndex        =   4
         Top             =   1500
         Width           =   1215
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "frmLogin.frx":2F5B
         Left            =   1395
         List            =   "frmLogin.frx":2F65
         TabIndex        =   3
         Text            =   "-1"
         Top             =   1005
         Width           =   1275
      End
      Begin VB.TextBox Text2 
         Height          =   300
         IMEMode         =   3  'DISABLE
         Left            =   1380
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   615
         Width           =   1275
      End
      Begin VB.TextBox Text1 
         Height          =   300
         Left            =   1365
         TabIndex        =   1
         Top             =   225
         Width           =   1275
      End
      Begin VB.Label Label3 
         BackStyle       =   0  'Transparent
         Caption         =   "用户类型:"
         Height          =   195
         Left            =   180
         TabIndex        =   8
         Top             =   1005
         Width           =   1215
      End
      Begin VB.Label Label2 
         BackStyle       =   0  'Transparent
         Caption         =   "用户密码:"
         Height          =   195
         Left            =   180
         TabIndex        =   7
         Top             =   615
         Width           =   1215
      End
      Begin VB.Label Label1 
         BackStyle       =   0  'Transparent
         Caption         =   "用户名:"
         Height          =   195
         Left            =   180
         TabIndex        =   6
         Top             =   225
         Width           =   1215
      End
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   90
      Top             =   960
      Visible         =   0   'False
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=clgl.mdb;Persist Security Info=False"
      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
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer

Private Sub Combo1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        Command1.SetFocus
    End If
End Sub

Private Sub Command1_Click()
  If Text3.Text = "" Then
    MsgBox "您还没有注册系统用户!", , "系统提示"
    MDIForm1.Show
    Unload Me
    Exit Sub
  End If
    Set adors = adoCon.Execute("select * from 用户表 where 用户姓名=ltrim('" & Text1 & "') and 密码=ltrim('" & Text2 & "') and 用户类型=ltrim('" & Combo1.Text & "')")
    If adors.EOF Then
        MsgBox "您输入的信息有误,请重新输入!", , "系统提示"
        Text1 = ""
        Text2 = ""
        Text1.SetFocus
        i = i + 1
        If i = 3 Then
            MsgBox "对不起,您已无权使用本系统!", , "系统提示"
            Unload Me
        End If
    Else
        Select Case adors!用户类型
            Case "管理员"
            
            Case "普通用户"
                 MDIForm1.mnuyydelete.Enabled = False
                 MDIForm1.mnusyscsh.Enabled = False
                 MDIForm1.mnuglyset.Enabled = False
        End Select
        MDIForm1.Show
        adors.Close
        Unload Me
    End If
End Sub

Private Sub Command2_Click()
    Unload Me
    'adoRs.Close
End Sub

Private Sub Form_Load()
    Combo1.ListIndex = 0
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        Text2.SetFocus
    End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then
        Combo1.SetFocus
    End If
End Sub

⌨️ 快捷键说明

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