VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3945
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4530
   LinkTopic       =   "Form1"
   ScaleHeight     =   3945
   ScaleWidth      =   4530
   StartUpPosition =   3  '窗口缺省
   Begin VB.PictureBox Picture1 
      Height          =   3255
      Left            =   240
      ScaleHeight     =   3195
      ScaleWidth      =   3915
      TabIndex        =   0
      Top             =   480
      Width           =   3975
   End
   Begin VB.Label Label1 
      Caption         =   "绘制各种图形"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   375
      Left            =   1560
      TabIndex        =   1
      Top             =   120
      Width           =   1575
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
   Form1.Show
   Dim R, X, Y As Integer
   Const PI = 3.1415926
   Picture1.Scale (-360, 260)-(360, -260)                  '定义坐标系
   Picture1.DrawStyle = 6                                  '设置线类型为内部实线
   Picture1.DrawWidth = 2                                  '设置线宽为2个点
   Picture1.Line (-358, 257)-(358, -257), QBColor(9), B    '画矩形框
   Rem 绘制从中心向四周饱和度逐渐变小的蓝色圆
   For I = 1 To 230 Step 5
      Picture1.Circle (0, 0), I, RGB(I, 255, I)
   Next I
   Rem 画坐标线
   Picture1.Line (-360, 0)-(360, 0), RGB(255, 0, 0)          '画水平坐标线
   Picture1.Line (0, 260)-(0, -260), RGB(255, 0, 0)          '画垂直坐标线
   Rem 绘制一条红色的正弦和余弦曲线
   For X = -360 To 360
      XH = PI / 180 * X
      Y1 = 200 * Sin(XH)
      Y2 = 200 * Cos(XH)
      Picture1.PSet (X, Y1), QBColor(12)
      Picture1.PSet (X, Y2), RGB(0, 0, 255)
   Next X
   Rem 绘制一个椭圆
   Picture1.FillStyle = 6
   Picture1.FillColor = RGB(255, 255, 0)
   Picture1.Circle (-180, 220), 60, RGB(255, 0, 0), , , 0.5
   Rem 绘制一个圆弧和一个扇形
    Picture1.FillStyle = 0
   Picture1.Circle (220, 150), 100, RGB(255, 0, 0), 45 * PI / 180, 135 * PI / 180
   Picture1.Circle (-280, -250), 100, RGB(255, 0, 0), -45 * PI / 180, -135 * PI / 180
End Sub
