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

📄 frm_login.frm

📁 学校财务管理系统课程设计VB+SQL2
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Frm_login 
   Caption         =   "用户登录"
   ClientHeight    =   3660
   ClientLeft      =   6780
   ClientTop       =   4515
   ClientWidth     =   5655
   LinkTopic       =   "Form1"
   ScaleHeight     =   3660
   ScaleWidth      =   5655
   Begin VB.Frame Frame1 
      Height          =   3615
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   5655
      Begin VB.TextBox TxtPwd 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         IMEMode         =   3  'DISABLE
         Left            =   1920
         PasswordChar    =   "*"
         TabIndex        =   4
         Top             =   1800
         Width           =   2415
      End
      Begin VB.TextBox TxtUser 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "Times New Roman"
            Size            =   9
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   315
         Left            =   1920
         TabIndex        =   3
         Text            =   "lichao"
         Top             =   1320
         Width           =   2415
      End
      Begin VB.CommandButton CmdEnter 
         Caption         =   "登录"
         Default         =   -1  'True
         Height          =   495
         Left            =   2760
         TabIndex        =   2
         Top             =   2640
         Width           =   1095
      End
      Begin VB.CommandButton Command2 
         Cancel          =   -1  'True
         Caption         =   "取消"
         Height          =   495
         Left            =   4080
         TabIndex        =   1
         Top             =   2640
         Width           =   1095
      End
      Begin VB.Line Line1 
         X1              =   0
         X2              =   5640
         Y1              =   3240
         Y2              =   3240
      End
      Begin VB.Label Label4 
         Caption         =   "版权所有    李超     All Rights Reserved "
         Height          =   255
         Left            =   960
         TabIndex        =   8
         Top             =   3360
         Width           =   3615
      End
      Begin VB.Label Label1 
         Alignment       =   2  'Center
         BorderStyle     =   1  'Fixed Single
         Caption         =   "学校财务管理系统"
         BeginProperty Font 
            Name            =   "隶书"
            Size            =   21.75
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H80000002&
         Height          =   495
         Left            =   360
         TabIndex        =   7
         Top             =   360
         Width           =   4935
      End
      Begin VB.Label Label3 
         Caption         =   "密码:"
         Height          =   255
         Left            =   1200
         TabIndex        =   6
         Top             =   1920
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "用户名:"
         Height          =   255
         Left            =   1080
         TabIndex        =   5
         Top             =   1440
         Width           =   975
      End
   End
End
Attribute VB_Name = "Frm_login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CmdEnter_Click()
Dim strSql As String   'sql查询语句
    Dim rst As New ADODB.Recordset
    
    If Trim(txtUser.Text) = "" Then
        MsgBox "请输入正确的用户名!", vbOKOnly + vbExclamation, "警告"
        txtUser.SetFocus
    Else
        strSql = "select * from tb_login where userid ='" & txtUser.Text & "' "
        
        Set rst = ExecuteSql(strSql)
        If rst.EOF = True Then
            MsgBox "用户名不存在,请重新输入!", vbOKOnly + vbExclamation, "警告"
            Set rst = ExecuteSql(strSql)
            txtUser.SetFocus
       Else
            If Trim(rst.Fields("userpwd")) = Trim(TxtPwd.Text) Then
                rst.Close
                Me.Hide
                frm_main.Show
            Else
                MsgBox "密码不正确,请重新输入!", vbOKOnly + vbExclamation, "警告"
                TxtPwd.Text = ""
                TxtPwd.SetFocus
            End If
         End If
     End If
    
    
End Sub

Private Sub Command2_Click()
End
End Sub

⌨️ 快捷键说明

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