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

📄 登录.frm

📁 利用VB对公司人事管理系统的部分功能的描述
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2 
   Caption         =   "Form2"
   ClientHeight    =   3060
   ClientLeft      =   60
   ClientTop       =   420
   ClientWidth     =   5730
   LinkTopic       =   "Form2"
   ScaleHeight     =   3060
   ScaleWidth      =   5730
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Caption         =   "操作员登录"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   2295
      Left            =   960
      TabIndex        =   0
      Top             =   240
      Width           =   3855
      Begin VB.CommandButton Command2 
         Caption         =   "取 消"
         Height          =   375
         Left            =   2160
         TabIndex        =   6
         Top             =   1680
         Width           =   735
      End
      Begin VB.CommandButton Command1 
         Caption         =   "确 定"
         Height          =   375
         Left            =   720
         TabIndex        =   5
         Top             =   1680
         Width           =   735
      End
      Begin VB.TextBox Text2 
         Height          =   375
         Left            =   1680
         TabIndex        =   4
         Top             =   960
         Width           =   1455
      End
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1680
         TabIndex        =   2
         Top             =   240
         Width           =   1455
      End
      Begin VB.Label Label2 
         Caption         =   "密 码"
         Height          =   255
         Left            =   600
         TabIndex        =   3
         Top             =   1080
         Width           =   615
      End
      Begin VB.Label Label1 
         Caption         =   "用户名"
         Height          =   255
         Left            =   600
         TabIndex        =   1
         Top             =   360
         Width           =   615
      End
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim i As Integer
If Text1.Text <> "liu" Then
   i = MsgBox("用户名错误!", 5 + vbExclamation, "输入用户名")
   Text1.Text = ""
     If i = 4 Then
       Text1.Text = ""
       Text1.SetFocus
     Else
       i = MsgBox("确定要退出本系统吗?", vbInformation + vbOKCancel + vbApplicationModal, "提示")
         If i = 2 Then
           Unload Me
           Form2.Show
         Else
           End
         End If
     End If
Else
   If Text2.Text <> "123" Then
   i = MsgBox("密码错误!", 5 + vbExclamation, "输入密码")
   Text2.Text = ""
     If i = 2 Then
       i = MsgBox("确定要退出本系统吗?", vbInformation + vbOKCancel + vbApplicationModal, "提示")
       If i = 2 Then
           Unload Me
           Form2.Show
         Else
           End
         End If
       Unload Me
       Form2.Show
     Else
       Text2.Text = ""
       Text2.SetFocus
     End If
   Else
     Form3.Show
     Unload Me
   End If
End If
End Sub

Private Sub Command2_Click()
   Dim i As Integer
  i = MsgBox("确定要退出本系统吗?", vbInformation + vbOKCancel + vbApplicationModal, "提示")
       If i = 2 Then
           Unload Me
           Form2.Show
         Else
           End
         End If
End Sub

Private Sub Text2_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then
  Dim i As Integer
     If Text1.Text <> "liu" Then
       i = MsgBox("用户名错误!", 5 + vbExclamation, "输入用户名")
       Text1.Text = ""
          If i = 4 Then
            Text1.Text = ""
            Text1.SetFocus
          Else
            i = MsgBox("确定要退出本系统吗?", vbInformation + vbOKCancel + vbApplicationModal, "提示")
            If i = 2 Then
              Unload Me
              Form2.Show
            Else
              End
            End If
      End If
  Else
   If Text2.Text <> "123" Then
   i = MsgBox("密码错误!", 5 + vbExclamation, "输入密码")
   Text2.Text = ""
     If i = 2 Then
       i = MsgBox("确定要退出本系统吗?", vbInformation + vbOKCancel + vbApplicationModal, "提示")
       If i = 2 Then
           Unload Me
           Form2.Show
         Else
           End
         End If
       Unload Me
       Form2.Show
     Else
       Text2.Text = ""
       Text2.SetFocus
     End If
   Else
     Form3.Show
     Unload Me
   End If
End If
End If
End Sub

Private Sub Form_Load()
   Text2.PasswordChar = "*"
   Text2.Text = ""
   Text1 = ""
End Sub

⌨️ 快捷键说明

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