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

📄 frmlogin.frm

📁 为一个公司
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmLogin 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "登录"
   ClientHeight    =   2625
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4740
   ClipControls    =   0   'False
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   9
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmLogin.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2625
   ScaleWidth      =   4740
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.TextBox txtPsd 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      IMEMode         =   3  'DISABLE
      Left            =   2010
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   1290
      Width           =   2310
   End
   Begin VB.ComboBox cmbUser 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      Left            =   2010
      TabIndex        =   0
      Top             =   720
      Width           =   2310
   End
   Begin VB.Frame Frame1 
      Height          =   2295
      Left            =   -45
      TabIndex        =   4
      Top             =   1800
      Width           =   4935
      Begin VB.CommandButton cmdExit 
         Caption         =   "退出(&X)"
         Height          =   375
         Left            =   3285
         TabIndex        =   3
         Top             =   270
         Width           =   1095
      End
      Begin VB.CommandButton cmdLogin 
         Caption         =   "进入->"
         Default         =   -1  'True
         Height          =   375
         Left            =   2070
         TabIndex        =   2
         Top             =   270
         Width           =   1095
      End
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "登录密码:"
      Height          =   180
      Index           =   1
      Left            =   1035
      TabIndex        =   8
      Top             =   1380
      Width           =   900
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "登录用户:"
      Height          =   180
      Index           =   0
      Left            =   1050
      TabIndex        =   7
      Top             =   795
      Width           =   900
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "进销存系统登录"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   330
      Left            =   135
      TabIndex        =   6
      Top             =   90
      Width           =   2670
   End
   Begin VB.Label Label15 
      BackColor       =   &H00FFFFFF&
      Height          =   510
      Left            =   -135
      TabIndex        =   5
      Top             =   0
      Width           =   5820
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdExit_Click()
  Unload Me
  End
End Sub

Private Sub cmdLogin_Click()
  With rstMain
    If .State = adStateOpen Then .Close
    .Open "select * from userinfo where user_id='" & cmbUser.Text & "' and user_psd='" & txtPsd.Text & "'"
    If .BOF And .EOF Then
      MsgBox "用户名或者密码不正确,请重新输入。", vbExclamation, "进销存系统"
      .Close
      Exit Sub
    Else
      gintLevel = !user_level
      gstrUser = cmbUser.Text
      .Close
      Unload Me
      frmMain.Show vbModal
    End If
  End With
End Sub

Private Sub Form_Load()
  ConnectLoadDB
  With rstMain
    If .State = adStateOpen Then .Close
    .Open "select * from userinfo"
    If Not .BOF Then .MoveFirst
    cmbUser.Clear
    While Not .EOF
      cmbUser.AddItem !user_id & ""
      .MoveNext
    Wend
    .Close
  End With
End Sub

⌨️ 快捷键说明

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