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

📄 frmarray.frm

📁 Visual Basic 6 大学教程的代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmArray01 
   Caption         =   "Fig. 7.2: Initializing array elements to zero"
   ClientHeight    =   3090
   ClientLeft      =   2745
   ClientTop       =   2415
   ClientWidth     =   4845
   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     =   3090
   ScaleWidth      =   4845
   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          =   615
      Left            =   3240
      TabIndex        =   1
      Top             =   1305
      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          =   615
      Left            =   3240
      TabIndex        =   0
      Top             =   345
      Width           =   1335
   End
End
Attribute VB_Name = "frmArray01"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 7.2
' Initializing array elements to 0
Option Explicit

Private Sub cmdPrint_Click()
   Dim n(9) As Integer     ' 10 Elements
   Dim x As Integer

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

   ' Ouput values. By default array n has
   ' each element initialized to 0
   For x = LBound(n) To UBound(n)
      Print Space$(2) & x & Space$(7) & n(x)
   Next x
   
End Sub

Private Sub cmdExit_Click()
   End
End Sub

⌨️ 快捷键说明

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