form2.frm

来自「本程序」· FRM 代码 · 共 78 行

FRM
78
字号
VERSION 5.00
Begin VB.Form Form2 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "密码确认"
   ClientHeight    =   1575
   ClientLeft      =   4530
   ClientTop       =   3900
   ClientWidth     =   2745
   Icon            =   "Form2.frx":0000
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1575
   ScaleWidth      =   2745
   ShowInTaskbar   =   0   'False
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   840
      TabIndex        =   2
      Top             =   1080
      Width           =   975
   End
   Begin VB.TextBox Text1 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   1080
      PasswordChar    =   "*"
      TabIndex        =   0
      Text            =   "07586"
      Top             =   600
      Width           =   1575
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      Height          =   375
      Left            =   0
      TabIndex        =   3
      Top             =   120
      Width           =   2775
   End
   Begin VB.Label Label1 
      Caption         =   "请输入密码"
      Height          =   255
      Left            =   0
      TabIndex        =   1
      Top             =   600
      Width           =   975
   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()
   If Form2.Text1 = "07586" Then
         form1.Show
         Form2.Hide
   Else: Form2.Label2.Caption = "密码错误 "
         Form2.Text1 = ""
         Form2.Text1.SetFocus
   End If
End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
      If Form2.Text1 = "07586" Then
         form1.Show
         Form2.Hide
   Else: Form2.Label2.Caption = "密码错误 "
         Form2.Text1 = ""
         Form2.Text1.SetFocus
   End If
End If

End Sub

⌨️ 快捷键说明

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