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

📄 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    =   3735
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6240
   Icon            =   "frmLogin.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmLogin.frx":1C7A
   ScaleHeight     =   3735
   ScaleWidth      =   6240
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox Text2 
      BorderStyle     =   0  'None
      Height          =   330
      IMEMode         =   3  'DISABLE
      Left            =   4260
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   1965
      Width           =   1485
   End
   Begin VB.TextBox Text1 
      BorderStyle     =   0  'None
      Height          =   330
      Left            =   4260
      TabIndex        =   0
      Top             =   1515
      Width           =   1485
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   360
      Top             =   3885
      Visible         =   0   'False
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      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=D:\程序修改\车辆管理系统\program\clgl.mdb;Persist Security Info=False"
      OLEDBString     =   "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\程序修改\车辆管理系统\program\clgl.mdb;Persist Security Info=False"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from 权限表 "
      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.Label Label2 
      BackStyle       =   0  'Transparent
      Height          =   345
      Left            =   4770
      TabIndex        =   3
      Top             =   2730
      Width           =   960
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Height          =   345
      Left            =   3585
      TabIndex        =   2
      Top             =   2730
      Width           =   960
   End
   Begin VB.Image Image1 
      Height          =   3750
      Left            =   0
      Picture         =   "frmLogin.frx":4793
      Stretch         =   -1  'True
      Top             =   0
      Width           =   6225
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*************************************************************************
'**模 块 名:frmLogin
'**版权说明:吉林省明日科技有限公司享有本软件的所有版权,如果本软件用于商
'**          业用途,必须经过吉林省明日科技有限公司授权。如果提供网上免费
'**          下载,必须经过吉林省明日科技有限公司授权,并保证程序的完整,
'**          不得修改代码、注释和相关内容,否则,我公司将追究其法律责任
'**网    址:www.mingrisoft.com  价值无限,服务无限
'**电    话:(0431)84978981,84978982
'**创 建 人:明日科技
'**日    期:2007-10-31
'**修 改 人:mraj
'**日    期:2007-10-31
'**描    述:
'*************************************************************************
Dim i As Integer

Private Sub Combo1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then    '按回车键Command1获得焦点
        Command1.SetFocus
    End If
End Sub

Private Sub Form_Load()
'自动识别路径
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\clgl.mdb;Persist Security Info=False"
Adodc1.RecordSource = "select * from 权限表 "
Adodc1.Refresh
End Sub

Private Sub Label1_Click()   '登陆
 '验证操作员及密码
   Adodc1.RecordSource = "select * from 权限表 where 用户名='" + Text1.Text + "'"
   Adodc1.Refresh
   If Adodc1.Recordset.RecordCount = 0 Then
     MsgBox "操作员输入错误!", , "车辆管理系统"
   ElseIf Adodc1.Recordset.RecordCount > 0 Then
     If Text1.Text <> "" And Text2.Text <> "" And Text2.Text = Adodc1.Recordset.Fields("密码") Then
       Load MDIForm1     '显示主窗体
       MDIForm1.Show
       op = Adodc1.Recordset.Fields("用户名")
       Unload Me
  Else
   If TIM = 3 Then     '密码输错3次,退出系统
     myval = MsgBox("密码输入错误,请向系统管理员查询!", 0, "车辆管理系统")
     If myval = vbOK Then End
   End If
   If Text1.Text = "" Then
     MsgBox ("请输入用户名!")
     Text1.SetFocus
    Else
     If Text1.Text <> Adodc1.Recordset.Fields("用户名") Then
       MsgBox ("查无此用户,请重新输入用户名!")
       Text1.SetFocus
     Else
      If Text2.Text = "" Then
        MsgBox ("请输入用户密码!")
        Text2.SetFocus
      Else
        If Text2.Text <> Adodc1.Recordset.Fields("密码") Then
          MsgBox ("密码错误,请重新输入密码!")
          TIM = TIM + 1
          Text2.SetFocus
        End If
       End If
     End If
   End If
 End If
End If
End Sub

Private Sub Label2_Click()  '取消
    Unload Me
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then    '按回车键Text2获得焦点
        Text2.SetFocus
    End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
    If KeyAscii = 13 Then   '按回车键调用Label1_Click()事件
    Label1_Click
    End If
End Sub



⌨️ 快捷键说明

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