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

📄 登录界面.frm

📁 是一个用VB编写的仓库管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form 登录界面 
   BorderStyle     =   3  'Fixed Dialog
   ClientHeight    =   3885
   ClientLeft      =   4875
   ClientTop       =   3870
   ClientWidth     =   6135
   Icon            =   "登录界面.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3885
   ScaleWidth      =   6135
   ShowInTaskbar   =   0   'False
   Begin MSAdodcLib.Adodc operater 
      Height          =   330
      Left            =   1200
      Top             =   3960
      Width           =   3615
      _ExtentX        =   6376
      _ExtentY        =   582
      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         =   "操作员"
      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.Frame Frame1 
      Height          =   3735
      Left            =   120
      TabIndex        =   5
      Top             =   0
      Width           =   5895
      Begin VB.CommandButton cmdDate 
         Caption         =   "修改日期"
         Height          =   615
         Left            =   3960
         TabIndex        =   4
         Top             =   2040
         Width           =   1215
      End
      Begin VB.CommandButton cmdOK 
         Caption         =   "确定(&O)"
         Default         =   -1  'True
         Enabled         =   0   'False
         Height          =   615
         Left            =   1080
         TabIndex        =   2
         Top             =   2040
         Width           =   1215
      End
      Begin VB.CommandButton cmdCancel 
         Cancel          =   -1  'True
         Caption         =   "取消(&C)"
         Height          =   615
         Left            =   2520
         TabIndex        =   3
         Top             =   2040
         Width           =   1215
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         BackColor       =   &H00FFC0C0&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   375
         Left            =   3000
         Locked          =   -1  'True
         TabIndex        =   10
         TabStop         =   0   'False
         Text            =   " 无操作员和密码"
         Top             =   653
         Width           =   2055
      End
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   375
         Left            =   720
         TabIndex        =   9
         TabStop         =   0   'False
         Top             =   3000
         Visible         =   0   'False
         Width           =   2055
         _ExtentX        =   3625
         _ExtentY        =   661
         _Version        =   393216
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         CalendarBackColor=   16744576
         CalendarTitleBackColor=   16761024
         CalendarTitleForeColor=   255
         Format          =   21037056
         CurrentDate     =   38093
      End
      Begin VB.TextBox txtTime 
         Alignment       =   2  'Center
         Appearance      =   0  'Flat
         BackColor       =   &H00C0FFFF&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   375
         Left            =   3240
         Locked          =   -1  'True
         TabIndex        =   8
         TabStop         =   0   'False
         Top             =   3000
         Width           =   2055
      End
      Begin VB.Timer Timer1 
         Interval        =   100
         Left            =   120
         Top             =   3240
      End
      Begin VB.TextBox txtPassword 
         Appearance      =   0  'Flat
         BackColor       =   &H00FFC0C0&
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         IMEMode         =   3  'DISABLE
         Left            =   3000
         MaxLength       =   12
         PasswordChar    =   "*"
         TabIndex        =   1
         Top             =   1275
         Width           =   2055
      End
      Begin VB.ComboBox Combo1 
         Appearance      =   0  'Flat
         BackColor       =   &H00FFC0C0&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   360
         ItemData        =   "登录界面.frx":0CCA
         Left            =   3000
         List            =   "登录界面.frx":0CCC
         Style           =   2  'Dropdown List
         TabIndex        =   0
         Top             =   660
         Width           =   2055
      End
      Begin VB.TextBox txtDate 
         Alignment       =   2  'Center
         Appearance      =   0  'Flat
         BackColor       =   &H00C0FFFF&
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H000000FF&
         Height          =   375
         Left            =   720
         Locked          =   -1  'True
         TabIndex        =   11
         TabStop         =   0   'False
         Top             =   3000
         Width           =   2055
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "密 码:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Index           =   1
         Left            =   1920
         TabIndex        =   7
         Top             =   1320
         Width           =   840
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "仓管员:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Index           =   0
         Left            =   1920
         TabIndex        =   6
         Top             =   720
         Width           =   840
      End
      Begin VB.Image Image1 
         Height          =   720
         Left            =   720
         Picture         =   "登录界面.frx":0CCE
         Top             =   720
         Width           =   720
      End
   End
End
Attribute VB_Name = "登录界面"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim datacount As Integer          '操作员个数

Private Sub cmdCancel_Click()         '取消
  If Login1 = 1 Then
    Unload Login
  Else
    End
  End If
  operater.Recordset.Close
End Sub

Private Sub cmdDate_Click()
  DTPicker1.Visible = True
End Sub

Private Sub CmdOK_Click()             '登录
  If txtPassword = Password And Trim(Password) <> "" Or datacount = 0 Then
    If Login1 = 1 Then
      Load 主界面
    Else
      主界面.Show
    End If
    If Rights = 2 Then
      主界面.M_Setup.Visible = False
    Else
      主界面.M_Setup.Visible = True
    End If
    Me.Hide
    If Login1 = 1 Then 主界面.StatusBar1.Panels.Item(1).Text = "管理员:   " & Operater1
    If Rights = 1 Then
      主界面.M_ChangePassword.Visible = True
    Else
      主界面.M_ChangePassword.Visible = False
    End If
  Else
    MsgBox "输入的密码有误,请重新输入!!!!"
    txtPassword.SetFocus
  End If
  txtPassword = ""
End Sub

Private Sub Combo1_Click()            '选择操作员
  If Trim(Combo1.Text) <> "" And datacount <> 0 Then
    txtPassword.Enabled = True
    txtPassword.SetFocus
    operater.RecordSource = "select * from operater where 姓名='" & Trim(Combo1.Text) & "'"
    operater.Refresh
    Operater1 = operater.Recordset.Fields(0)
    Password = operater.Recordset.Fields(1)
    Rights = operater.Recordset.Fields(2)
  End If
End Sub

Private Sub DTPicker1_Change()        '改变日期
  Date = DTPicker1.Value
  DTPicker1.Visible = False
  txtDate = Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日"
  MsgBox ("日期更改成功!!!")
  If Login1 = 1 Then Mainform.StatusBar1.Panels.Item(3).Text = Date
End Sub

Private Sub Form_Load()               '初始化
  登录界面.Caption = "登录"
  txtDate = Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日"
  DTPicker1.Value = Date
  Call pd
  If datacount = 0 Then
    Operater1 = "无"
    Combo1.Enabled = False
    txtPassword.Enabled = False
    cmdOK.Enabled = True
    Text1.Visible = True
  Else
    operater.Recordset.MoveFirst
    Do While operater.Recordset.EOF = False
      Combo1.AddItem operater.Recordset.Fields(0)
      operater.Recordset.MoveNext
    Loop
    Text1.Visible = False
  End If
End Sub

Private Sub Text2_Change()

End Sub

Private Sub Timer1_Timer()
  txtTime.Text = Time
End Sub

Private Sub pd()                      '判断是否存在操作员
  operater.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Storehouse.mdb;Persist Security Info=False"
  operater.CommandType = adCmdUnknown
  operater.RecordSource = "select * from Operater"
  operater.Refresh
  datacount = operater.Recordset.RecordCount
End Sub

Private Sub txtPassword_Change()      '判断是否输入密码
  If Len(Trim(txtPassword)) = 0 Then
    cmdOK.Enabled = False
  Else
    cmdOK.Enabled = True
  End If
End Sub

Private Sub txtPassword_GotFocus()
  txtPassword.BackColor = &HC0FFFF
  txtPassword.SelStart = 0
  txtPassword.SelLength = 12
End Sub

Private Sub txtPassword_LostFocus()
  txtPassword.BackColor = &HFFC0C0
End Sub

⌨️ 快捷键说明

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