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

📄 f3-2.frm

📁 VB课程教学的讲义源的代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form2"
   ClientHeight    =   2568
   ClientLeft      =   60
   ClientTop       =   348
   ClientWidth     =   5088
   LinkTopic       =   "Form2"
   ScaleHeight     =   2568
   ScaleWidth      =   5088
   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            =   2280
      MaxLength       =   5
      TabIndex        =   0
      Text            =   " "
      Top             =   360
      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            =   2280
      MaxLength       =   4
      TabIndex        =   1
      Text            =   " "
      Top             =   960
      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            =   1560
      TabIndex        =   2
      Top             =   1680
      Width           =   1935
   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            =   1200
      TabIndex        =   4
      Top             =   360
      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            =   1200
      TabIndex        =   3
      Top             =   960
      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
    Else
        Print "输入密码正确"
    End If
End Sub

⌨️ 快捷键说明

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