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

📄 frmboolean.frm

📁 Visual Basic 6 大学教程的代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmBoolean 
   Caption         =   "Fig. 5.18: Demonstrating data type Boolean"
   ClientHeight    =   3195
   ClientLeft      =   2580
   ClientTop       =   2070
   ClientWidth     =   4860
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4860
   Begin VB.CommandButton cmdPrint 
      Caption         =   "Print"
      Height          =   495
      Left            =   3330
      TabIndex        =   0
      Top             =   285
      Width           =   1215
   End
End
Attribute VB_Name = "frmBoolean"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 5.18
' Demonstrating data type Boolean
Option Explicit                  ' General declaration

Private Sub cmdPrint_Click()
   Dim bool As Boolean
   Dim x As Integer

   x = -1                        ' Initialize x to -1
   Print "x" & vbTab & "bool"    ' Print Header
   
   Do Until x = 10
      bool = x                   ' Implicit conversion
      Print x & vbTab & bool     ' Print True or False
      x = x + 1                  ' Increment x
   Loop
      
   Print                         ' Print blank line
   bool = True                   ' Assign True
   Print bool                    ' Print True or False
   bool = False                  ' Assign False
   Print bool                    ' Print True or False
      
End Sub

⌨️ 快捷键说明

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