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

📄 例7.frm

📁 在VB5环境下开发的VB程序集,窗体控件源代码.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "字符计数"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6345
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   12
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   6345
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "输入"
      Height          =   615
      Left            =   2880
      TabIndex        =   0
      Top             =   2160
      Width           =   1335
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Command1_Click()
  Static d1%, d2%, d3%
  Dim ch$
  ch$ = InputBox("请输入一个字符:")
  ch$ = Left$(ch$, 1)
  If ch$ >= "0" And ch$ <= "9" Then
    d1 = d1 + 1
  ElseIf UCase(ch$) >= "A" And UCase(ch$) <= "z" Then
    d2 = d2 + 1
  Else
    d3 = d3 + 1
  End If
  Print "数字字符"; d1, "字母字符"; d2, "其它字符"; d3
End Sub

⌨️ 快捷键说明

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