实验2.3.frm

来自「VB实验教程源码」· FRM 代码 · 共 54 行

FRM
54
字号
VERSION 5.00
Begin VB.Form 整除显示 
   Caption         =   "Form1"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   4680
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "Command1"
      Height          =   615
      Left            =   1440
      TabIndex        =   2
      Top             =   1680
      Width           =   1335
   End
   Begin VB.ListBox List1 
      Height          =   420
      Left            =   1200
      TabIndex        =   0
      Top             =   720
      Width           =   1695
   End
   Begin VB.Label Label1 
      Caption         =   "输出100到200之间被3整除的数"
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   120
      Width           =   2895
   End
End
Attribute VB_Name = "整除显示"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Dim x As Integer, y As Boolean, z As Integer
z = 0
For x = 100 To 200
y = x Mod 3
    If Not y Then
        List1.AddItem x, z
        z = z + 1
   End If
Next x
End Sub

⌨️ 快捷键说明

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