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

📄 frmlogin.frm

📁 超市管理系统是一个超市不可缺少的部分,它的内容对于超市的决策者和管理者来说都至关重要,所以超市管理系统应该能够为用户提供充足的信息和快捷的销售
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmLogin 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "Login"
   ClientHeight    =   3630
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   4830
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "frmLogin.frx":0000
   ScaleHeight     =   3630
   ScaleWidth      =   4830
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   2160
      TabIndex        =   3
      Top             =   960
      Width           =   1335
   End
   Begin VB.TextBox Text1 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   2160
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   1440
      Width           =   1335
   End
   Begin VB.Label Label5 
      BackColor       =   &H80000001&
      BackStyle       =   0  'Transparent
      Caption         =   "   超市管理系统"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   24
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   495
      Left            =   360
      TabIndex        =   6
      Top             =   240
      Width           =   4215
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      BackColor       =   &H00C000C0&
      BackStyle       =   0  'Transparent
      Caption         =   "退出"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   435
      Left            =   2880
      TabIndex        =   5
      Top             =   2520
      Width           =   900
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackColor       =   &H00C000C0&
      BackStyle       =   0  'Transparent
      Caption         =   "确定"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   435
      Left            =   1080
      TabIndex        =   4
      Top             =   2520
      Width           =   900
   End
   Begin VB.Label Label2 
      BackColor       =   &H000000C0&
      BackStyle       =   0  'Transparent
      Caption         =   "密码"
      Height          =   255
      Left            =   1320
      TabIndex        =   1
      Top             =   1560
      Width           =   615
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "用户名"
      Height          =   255
      Left            =   1320
      TabIndex        =   0
      Top             =   960
      Width           =   735
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim stremployee As String
Dim rs_employee As New ADODB.Recordset

Private Sub Form_Activate()
stremployee = "select * from employee "
rs_employee.Open stremployee, cnn, adOpenStatic, adLockOptimistic
Dim i As Integer
For i = 0 To rs_employee.RecordCount - 1
    Combo1.AddItem (rs_employee.Fields("员工姓名"))
    rs_employee.MoveNext
Next
rs_employee.Close
End Sub

Private Sub Form_Load()
cnn.Provider = "microsoft.jet.oledb.4.0"
cnn.ConnectionString = App.Path & "\sellsystem.mdb"
cnn.Open

End Sub

Private Sub Picture1_Click()
  
End Sub

Private Sub Label3_Click()
 If Combo1.Text = "" Then
       MsgBox "请输入用户名!", vbOKOnly + vbInformation, "注意"
       Combo1.SetFocus
       Exit Sub
    ElseIf Text1.Text = "" Then
           MsgBox "请输入密码!", vbOKOnly + vbInformation, "注意"
           Text1.SetFocus
           Exit Sub
   End If
   stremployee = "select * from employee where 员工姓名='" & Combo1.Text & "' and 员工密码='" & Text1.Text & "'"
   rs_employee.Open stremployee, cnn, adOpenStatic, adLockOptimistic
   If rs_employee.EOF = True Then
      MsgBox "用户名或密码错误,请从新输入!", vbOKOnly + vbInformation, "注意"
      Combo1.SetFocus
      rs_employee.Close
      Exit Sub
   Else
      strs = rs_employee.Fields("员工编号")
      rs_employee.Close
   End If
   If Combo1.Text = "administrator" Then
      frminitial.Show
   Else
      frmMain.Show
      frmMain.mnBuyAll.Enabled = False
      frmMain.mnSellAll.Enabled = False
      frmMain.mnTable.Enabled = False
   End If
      Unload Me
End Sub

Private Sub Label4_Click()
Unload Me
cnn.Close

End Sub

Private Sub Picture2_Click()
End Sub

⌨️ 快捷键说明

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