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

📄 login.frm

📁 商品管理系统 商品管理系统 商品管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form xitong_denglu 
   Caption         =   "登录"
   ClientHeight    =   3450
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5490
   LinkTopic       =   "Form1"
   ScaleHeight     =   3450
   ScaleWidth      =   5490
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   495
      Left            =   2400
      TabIndex        =   6
      Top             =   2760
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   495
      Left            =   720
      TabIndex        =   5
      Top             =   2760
      Width           =   975
   End
   Begin VB.Frame Frame1 
      Height          =   1695
      Left            =   480
      TabIndex        =   0
      Top             =   960
      Width           =   3135
      Begin VB.TextBox Text2 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1200
         PasswordChar    =   "*"
         TabIndex        =   4
         Top             =   960
         Width           =   1815
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1200
         TabIndex        =   3
         Top             =   240
         Width           =   1815
      End
      Begin VB.Label Label2 
         Caption         =   "密  码:"
         Height          =   255
         Left            =   360
         TabIndex        =   2
         Top             =   1080
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "用户名:"
         Height          =   375
         Left            =   240
         TabIndex        =   1
         Top             =   480
         Width           =   855
      End
   End
   Begin VB.Image Image1 
      Height          =   1500
      Left            =   3840
      Picture         =   "login.frx":0000
      Top             =   1080
      Width           =   1620
   End
   Begin VB.Label Label3 
      Caption         =   "用户登录"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1800
      TabIndex        =   7
      Top             =   240
      Width           =   1935
   End
End
Attribute VB_Name = "xitong_denglu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim sql As String
Dim rs_login As New ADODB.Recordset
If Trim(Text1.Text) = "" Then            '判断输入的用户名是否为空
   MsgBox "没有这个用户", vbOKOnly + vbExclamation, ""
   Text1.SetFocus
Else
   sql = "select * from 用户管理 where 用户名='" & Text1.Text & "'"
   rs_login.Open sql, conn, adOpenKeyset, adLockPessimistic
   If rs_login.EOF = True Then
      MsgBox "没有这个用户", vbOKOnly + vbExclamation, ""
      Text1.SetFocus
   Else                                  '检验密码是否正确
      If Trim(rs_login.Fields(1)) = Trim(Text2.Text) Then
      MsgBox "密码正确,欢迎进入商品管理系统!!", 0, "提示!"
          userID = Text1.Text
          rs_login.Close
          Unload Me
     xitong_zhujiemiang.Show
      Else
         MsgBox "密码不正确", vbOKOnly + vbExclamation, ""
         Text2.SetFocus
      End If
   End If
End If
cnt = cnt + 1
If cnt = 3 Then
MsgBox "对不起,您已连续三次输入错误,请确认正确密码再试,谢谢!", vbOKOnly + vbExclamation, ""
   Unload Me
End If
Exit Sub
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim connectionstring As String
connectionstring = "provider=Microsoft.Jet.oledb.4.0;" & _
                   "data source=data.mdb"
conn.Open connectionstring
cnt = 0
End Sub






⌨️ 快捷键说明

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