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

📄 form1.frm

📁 蒋加伏主编VB程序设计第四版PPT及全部课本源码 北京邮电大学出版社 Visual Basic 程序设计教程(第四版) 主编 蒋加伏 张林峰 找了好久的(不带密码的)
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "例[7-6] 控件数组的应用"
   ClientHeight    =   3030
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4410
   LinkTopic       =   "Form1"
   ScaleHeight     =   3030
   ScaleWidth      =   4410
   StartUpPosition =   3  '窗口缺省
   Begin VB.PictureBox Picture1 
      Height          =   2535
      Left            =   1200
      ScaleHeight     =   2475
      ScaleWidth      =   2835
      TabIndex        =   4
      Top             =   240
      Width           =   2895
   End
   Begin VB.OptionButton Option1 
      Caption         =   "艺术图"
      Height          =   495
      Index           =   3
      Left            =   120
      TabIndex        =   3
      Top             =   2160
      Width           =   855
   End
   Begin VB.OptionButton Option1 
      Caption         =   "螺线"
      Height          =   495
      Index           =   2
      Left            =   120
      TabIndex        =   2
      Top             =   1560
      Width           =   855
   End
   Begin VB.OptionButton Option1 
      Caption         =   "方形"
      Height          =   495
      Index           =   1
      Left            =   120
      TabIndex        =   1
      Top             =   960
      Width           =   855
   End
   Begin VB.OptionButton Option1 
      Caption         =   "圆"
      Height          =   495
      Index           =   0
      Left            =   120
      TabIndex        =   0
      Top             =   360
      Width           =   855
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Option1_Click(Index As Integer)
Dim i As Single, x As Single, y As Single
Dim r As Single, st As Single
Picture1.ForeColor = RGB(255, 0, 0)          '定义前景颜色
Select Case Index
Case 0
Picture1.Cls
Picture1.Scale (0, 0)-(20, 20)          '定位
Picture1.Circle (10, 10), 7, , , , 1    '画圆
Case 1
Picture1.Cls
Picture1.Scale (0, 0)-(20, 20)          '定位
Picture1.Line (5, 5)-(15, 15), , B      '画矩形
Case 2
Picture1.Cls
Picture1.Scale (-10, 10)-(10, -10)      '定位
Picture1.Line (0, 11)-(0, -11)
Picture1.Line (11, 0)-(-11, 0)
For i = 0 To 10 Step 0.005
y = i * Sin(i)
x = i * Cos(i)
Picture1.PSet (x, y)
Next i
Case 3
Picture1.Cls
r = 4.5
st = 3.1415926 / 25
Picture1.Scale (-10, 10)-(10, -10)      '定位
For i = 0 To 6.283185 Step st
x = r * Cos(i)
y = r * Sin(i)
Picture1.Circle (x, y), r * 0.9
Next i
End Select
End Sub

⌨️ 快捷键说明

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