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

📄 frmexsub.frm

📁 Visual Basic 6 大学教程的代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmExSub 
   Caption         =   "Fig. 6.13: Demonstrating Exit Sub"
   ClientHeight    =   3300
   ClientLeft      =   3120
   ClientTop       =   1710
   ClientWidth     =   4185
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   12
      Charset         =   0
      Weight          =   700
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForeColor       =   &H80000008&
   LinkTopic       =   "Form1"
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   3300
   ScaleWidth      =   4185
   Begin VB.CommandButton cmdBegin 
      BackColor       =   &H80000005&
      Caption         =   "Print"
      Height          =   615
      Left            =   1305
      TabIndex        =   0
      Top             =   2520
      Width           =   1575
   End
End
Attribute VB_Name = "frmExSub"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 6.13
' Demonstrating Exit Sub
Option Explicit     ' General declaration

Private Sub cmdBegin_Click()
   Dim x As Integer

   For x = 5 To -1 Step -1
      Call PrintNumbers(x)
   Next x

   cmdBegin.Enabled = False
End Sub

Private Sub PrintNumbers(number As Integer)

   If number >= 0 Then
      Print number
   Else
      Print "Exiting Sub with number = " & number
      Exit Sub    ' Exit procedure
   End If

End Sub

⌨️ 快捷键说明

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