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

📄 frmarra2.frm

📁 Visual Basic 6 大学教程的代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmArrayEven 
   Caption         =   "Fig. 7.3: Placing values into array elements"
   ClientHeight    =   3030
   ClientLeft      =   2325
   ClientTop       =   2010
   ClientWidth     =   5100
   BeginProperty Font 
      Name            =   "Courier"
      Size            =   12
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H80000008&
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   3030
   ScaleWidth      =   5100
   Begin VB.CommandButton cmdExit 
      BackColor       =   &H80000005&
      Caption         =   "Exit"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   3540
      TabIndex        =   1
      Top             =   1140
      Width           =   1335
   End
   Begin VB.CommandButton cmdPrint 
      BackColor       =   &H80000005&
      Caption         =   "Print"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   735
      Left            =   3540
      TabIndex        =   0
      Top             =   180
      Width           =   1335
   End
End
Attribute VB_Name = "frmArrayEven"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 7.3
' Initializing an array
Option Explicit

Private Sub cmdPrint_Click()
   Dim s(9) As Integer
   Dim x As Integer

   Call Cls

   ' Initialize array to even elements
   For x = LBound(s) To UBound(s)
      s(x) = 2 + 2 * x
   Next x

   Print "Index" & Space$(3) & "Value"

   For x = LBound(s) To UBound(s)
      Print Space$(2) & x & Space$(7) & s(x)
   Next x
   
End Sub

Private Sub cmdExit_Click()
   End
End Sub

⌨️ 快捷键说明

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