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

📄 frmlogin.frm

📁 一个关于进销存的源代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmlogin 
   AutoRedraw      =   -1  'True
   BackColor       =   &H00FF8080&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "请登录..."
   ClientHeight    =   2070
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   4605
   Icon            =   "frmlogin.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2070
   ScaleWidth      =   4605
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Command2 
      BackColor       =   &H00FF8080&
      Caption         =   "Command2"
      Height          =   375
      Left            =   3360
      Picture         =   "frmlogin.frx":030A
      TabIndex        =   5
      Top             =   1200
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Appearance      =   0  'Flat
      BackColor       =   &H00FF8080&
      Caption         =   "Command1"
      Height          =   375
      Left            =   3360
      MaskColor       =   &H00FF8080&
      Picture         =   "frmlogin.frx":CCF8
      TabIndex        =   4
      Top             =   480
      UseMaskColor    =   -1  'True
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00FF8080&
      Caption         =   "--登录--"
      Height          =   1815
      Left            =   240
      TabIndex        =   0
      Top             =   120
      Width           =   3015
      Begin VB.TextBox Text1 
         Height          =   270
         Left            =   1200
         TabIndex        =   1
         Text            =   "Text1"
         Top             =   360
         Width           =   1695
      End
      Begin VB.TextBox Text2 
         Height          =   270
         IMEMode         =   3  'DISABLE
         Left            =   1200
         PasswordChar    =   "*"
         TabIndex        =   2
         Text            =   "Text2"
         Top             =   810
         Width           =   1695
      End
      Begin VB.ComboBox Combo1 
         Height          =   300
         ItemData        =   "frmlogin.frx":196E6
         Left            =   1200
         List            =   "frmlogin.frx":196E8
         Style           =   2  'Dropdown List
         TabIndex        =   3
         Top             =   1260
         Width           =   1695
      End
      Begin VB.Label Label3 
         BackColor       =   &H00FF8080&
         Caption         =   "Label3"
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   1320
         Width           =   855
      End
      Begin VB.Label Label2 
         BackColor       =   &H00FF8080&
         Caption         =   "Label2"
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   840
         Width           =   855
      End
      Begin VB.Label Label1 
         BackColor       =   &H00FF8080&
         Caption         =   "Label1"
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   360
         Width           =   855
      End
   End
End
Attribute VB_Name = "frmlogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
        Dim rdst As New ADODB.Recordset
        rdst.Open "select * from userlist where 用户名='" & Text1.Text & "'and 用户密码='" & Text2.Text & "'and 用户类型= " & Combo1.ListIndex & "", g_conn
            If rdst.EOF = False Then
                usertype = Combo1.ListIndex
                curuser = Text1.Text  '当前用户
                frmjiemian.Show
                Unload Me
            Else
                 tishi = MsgBox("对不起,你不具备此权限!", vbOKOnly, "系统登录")
            End If
End Sub

Private Sub Command2_Click()
      Unload Me
End Sub

Private Sub Form_Load()
'        Set A = Skin1
    '    A.ApplySkin Me.hWnd
        
        Label1.Caption = "用户名:"
        Label2.Caption = "口  令:"
        Label3.Caption = "权  限:" '
        Text1.Text = ""
        Text2.Text = ""
        Command1.Caption = "登录"
        Command2.Caption = "取消"
        Combo1.Clear
        Combo1.AddItem "管理人员", 0
        Combo1.AddItem "浏览人员", 1
        Combo1.ListIndex = 0
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
   If KeyAscii = 13 Then Command1_Click
End Sub

⌨️ 快捷键说明

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