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

📄 frm_login.frm

📁 小型超市进销存系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm_Login 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "登陆"
   ClientHeight    =   2505
   ClientLeft      =   3960
   ClientTop       =   3255
   ClientWidth     =   4080
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2505
   ScaleWidth      =   4080
   Begin VB.CommandButton cmdExit 
      Caption         =   "退 出"
      Height          =   375
      Left            =   2280
      TabIndex        =   3
      Top             =   1800
      Width           =   975
   End
   Begin VB.CommandButton cmdEnter 
      Caption         =   "登 陆"
      Height          =   375
      Left            =   720
      TabIndex        =   2
      Top             =   1800
      Width           =   975
   End
   Begin VB.TextBox Text2 
      Height          =   340
      IMEMode         =   3  'DISABLE
      Left            =   1920
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   1080
      Width           =   1215
   End
   Begin VB.TextBox Text1 
      Height          =   340
      Left            =   1920
      TabIndex        =   0
      Top             =   437
      Width           =   1215
   End
   Begin VB.Label Label2 
      Alignment       =   1  'Right Justify
      Caption         =   "密  码:"
      Height          =   255
      Left            =   720
      TabIndex        =   5
      Top             =   1125
      Width           =   975
   End
   Begin VB.Label Label1 
      Alignment       =   1  'Right Justify
      Caption         =   "用户名:"
      Height          =   255
      Left            =   720
      TabIndex        =   4
      Top             =   480
      Width           =   975
   End
End
Attribute VB_Name = "frm_Login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Urs As New ADODB.Recordset
Private Sub cmdEnter_Click()
Dim strsql As String
strsql = "select * from t_purview where employeeid='" & Text1.Text & "'"
Set Urs = Dblink.executeSQL(strsql)
If Urs.RecordCount = 0 Then
    MsgBox "无此用户,请重新输入!"
    Text1.SetFocus
    Exit Sub
Else
uName = Text1.Text
uPower = Urs.Fields(1)
End If
If Text2.Text = Urs.Fields(2) Then
    If uPower = 1 Then
    frmYZLSale.Show 1
    Unload Me
    Exit Sub
    Else
    MDI_main.Show
    Unload Me
    Exit Sub
    End If
Else
MsgBox "密码不正确!"

End If

End Sub

Private Sub cmdExit_Click()
Unload Me
End Sub

Private Sub Form_Load()
Dim strsql As String
strsql = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=supermarket;Data Source=."
Dblink.linkDB strsql
End Sub

Private Sub Text1_GotFocus()
  Text1.SelStart = 0
    Text1.SelLength = Len(Text1.Text)
End Sub

⌨️ 快捷键说明

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