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

📄 v6b03-02.frm

📁 一个实现账号、密码登陆框的事例,有兴趣的同学
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form2"
   ClientHeight    =   2115
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4680
   LinkTopic       =   "Form2"
   ScaleHeight     =   2115
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox txtNo 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1920
      MaxLength       =   6
      TabIndex        =   2
      Text            =   " "
      Top             =   120
      Width           =   1455
   End
   Begin VB.TextBox txtPas 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1920
      MaxLength       =   4
      TabIndex        =   1
      Text            =   " "
      Top             =   720
      Width           =   1455
   End
   Begin VB.CommandButton cmdOk 
      Caption         =   "确定"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   840
      TabIndex        =   0
      Top             =   1320
      Width           =   855
   End
   Begin VB.Label lblNo 
      BorderStyle     =   1  'Fixed Single
      Caption         =   "帐号"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   840
      TabIndex        =   4
      Top             =   120
      Width           =   855
   End
   Begin VB.Label lblPas 
      BorderStyle     =   1  'Fixed Single
      Caption         =   "密码"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   840
      TabIndex        =   3
      Top             =   720
      Width           =   855
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
   txtPas.PasswordChar = "*"
   txtPas.Text = ""
   txtNo = ""
End Sub
Private Sub txtNo_LostFocus()
    If Not IsNumeric(txtNo) Then
       MsgBox "帐号有非数字字符错误"
        txtNo.Text = ""
        txtNo.SetFocus
     End If
End Sub
Private Sub cmdOk_Click()
Dim I As Integer
If txtPas.Text <> "Gong" Then
  I = MsgBox("密码错误", 5 + vbExclamation, "输入密码")
  If I <> 4 Then
    End
  Else
    txtPas.Text = ""
    txtPas.SetFocus
  End If
  End If
End Sub

⌨️ 快捷键说明

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