📄 frmexitdo.frm
字号:
VERSION 5.00
Begin VB.Form frmExitDo
Caption = "Fig. 5.16: Demonstrating Exit Do"
ClientHeight = 2025
ClientLeft = 2700
ClientTop = 1980
ClientWidth = 4680
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 2025
ScaleWidth = 4680
Begin VB.CommandButton cmdPrint
Caption = "Print"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1740
TabIndex = 0
Top = 1350
Width = 1215
End
End
Attribute VB_Name = "frmExitDo"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 5.16
' Demonstrating Exit Do.
Option Explicit ' General Declaration
Private Sub cmdPrint_Click()
Dim x As Integer
x = 1
Do
If x = 5 Then
Exit Do ' Exit loop only if x = 5
End If
Print x & Space$(2);
x = x + 1
Loop While x <= 10
Print "Exited loop at x = " & x
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -