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

📄 f2-9.frm

📁 VB课程教学的讲义源的代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "输入的内容是否为数字"
   ClientHeight    =   1824
   ClientLeft      =   60
   ClientTop       =   456
   ClientWidth     =   6120
   LinkTopic       =   "Form1"
   ScaleHeight     =   1824
   ScaleWidth      =   6120
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   3360
      Locked          =   -1  'True
      TabIndex        =   2
      Top             =   600
      Width           =   2175
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   1560
      TabIndex        =   1
      Top             =   600
      Width           =   1455
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BorderStyle     =   1  'Fixed Single
      Caption         =   "输入数字"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      Left            =   120
      TabIndex        =   0
      Top             =   600
      Width           =   1140
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Text1_LostFocus()
    Dim i As Integer
    If IsNumeric(Text1) Then
        Text2.Text = "正确!"
    Else
        For i = 1 To 100         '输入错,重复铃响
            Beep
        Next i
        Text1.Text = ""
        Text1.SetFocus
        Text2.Text = "错误,再输入!"
    End If
End Sub

⌨️ 快捷键说明

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