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

📄 例12.frm

📁 在VB5环境下开发的VB程序集,窗体控件源代码.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FRM5_4_2 
   BackColor       =   &H00C0FFFF&
   Caption         =   "5-4-2:打印图形"
   ClientHeight    =   5400
   ClientLeft      =   525
   ClientTop       =   1110
   ClientWidth     =   8415
   BeginProperty Font 
      Name            =   "宋体"
      Size            =   18
      Charset         =   134
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   5400
   ScaleWidth      =   8415
   Begin VB.CommandButton Command2 
      Caption         =   "三角形"
      Height          =   1455
      Left            =   7800
      TabIndex        =   2
      Top             =   720
      Width           =   495
   End
   Begin VB.CommandButton Command1 
      Caption         =   "平行四边形"
      Height          =   2175
      Left            =   240
      TabIndex        =   1
      Top             =   360
      Width           =   495
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFFFF&
      BorderStyle     =   1  'Fixed Single
      Height          =   1935
      Left            =   600
      TabIndex        =   0
      Top             =   3240
      Width           =   7335
   End
End
Attribute VB_Name = "FRM5_4_2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Cls
For i = 1 To 3
  Print Tab(10 + i);
  For j = 1 To 5
  Print "*";
  Next j
  Print
Next i
End Sub

Private Sub Command2_Click()
Cls
For i = 1 To 3
  Print Tab(31 - i);
  For j = 1 To 2 * (i - 1) + 1
  Print "*";
  Next j
  Print
Next i
End Sub

Private Sub Form_Load()
Label1.Caption = "提示:打印平面图形一般要用双重循环,外层循环控制行数,内层循环控制列数,内、外循环的入口交界处用相应函数控制打印图形的起始位置,内、外循环的出口交界处用print语句实现换行"
End Sub

⌨️ 快捷键说明

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