form1.frm

来自「vb 的例子」· FRM 代码 · 共 37 行

FRM
37 行
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "递归圆圈"
   ClientHeight    =   8400
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9885
   LinkTopic       =   "Form1"
   ScaleHeight     =   8400
   ScaleWidth      =   9885
   StartUpPosition =   3  'Windows Default
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Click()
    BackColor = vbWhite
    Width = 8000
    Height = 8000
    Call DrawCircle(ScaleWidth / 2, ScaleHeight / 2, ScaleWidth / 6.5)
End Sub

Private Sub DrawCircle(X As Integer, Y As Integer, R As Integer)
    Dim int1 As Integer
    If R < 60 Then
        Circle (X, Y), R
    Else
        Circle (X, Y), R
        For int1 = 0 To 7
            Call DrawCircle(X + 2 * R * Cos(int1 * 3.141593 / 4), Y + 2 * R * Sin(int1 * 3.141593 / 4), R / 3.5)
        Next
    End If
End Sub

⌨️ 快捷键说明

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