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

📄 frmprint.frm

📁 Visual Basic 6 大学教程的代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmPrint 
   BackColor       =   &H00FFFFFF&
   Caption         =   "Fig. 9.8: Using method Circle"
   ClientHeight    =   3195
   ClientLeft      =   2865
   ClientTop       =   2340
   ClientWidth     =   5505
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   5505
   Begin VB.CommandButton cmdPrint 
      Caption         =   "Print"
      Height          =   495
      Left            =   120
      TabIndex        =   0
      Top             =   2640
      Width           =   1215
   End
End
Attribute VB_Name = "frmPrint"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
' Fig. 9.8
' Using method Circle
Option Explicit

Private Sub cmdPrint_Click()
   Dim x As Single, y As Single
   Dim r As Single
   
   Call Randomize
   
   ' Randomly pick values to draw at
   x = Rnd() * 5 '* Width * 5
   y = Rnd() * 5 '* Height * 5
   r = Rnd() * 2.5
      
   Scale (-1, 5)-(5, -5)
   
   ' Randomly decide which shape
   Select Case Int(Rnd() * 5)
      Case 0   ' Circle
         Circle (x, y), r
      Case 1   ' Ellipse
         Circle (x, y), r, , , , 1.5
      Case 2   ' Ellipse
         Circle (x, y), r, , , , 0.5
      Case 3   ' Sector
         Circle (x, y), r, vbRed, -2 * Atn(1), -4 * Atn(1)
      Case 4   ' Arc
         Circle (x, y), r, vbRed, 2 * Atn(1), 4 * Atn(1)
   End Select
   
End Sub

⌨️ 快捷键说明

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