VERSION 5.00
Begin VB.Form frm1 
   BackColor       =   &H00004040&
   Caption         =   "Графики функций"
   ClientHeight    =   4392
   ClientLeft      =   2604
   ClientTop       =   2556
   ClientWidth     =   7236
   LinkTopic       =   "Form1"
   ScaleHeight     =   4392
   ScaleWidth      =   7236
   Begin VB.CommandButton cmd1 
      Caption         =   "Графики"
      Height          =   495
      Left            =   3000
      TabIndex        =   1
      Top             =   3720
      Width           =   1095
   End
   Begin VB.PictureBox picGraph 
      BackColor       =   &H00FFFFFF&
      DrawWidth       =   2
      Height          =   3255
      Left            =   480
      ScaleHeight     =   3204
      ScaleWidth      =   6204
      TabIndex        =   0
      Top             =   240
      Width           =   6255
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim sngX As Single
Private Sub cmd1_Click()
'Задание масштаба
picGraph.Scale (-5, 2)-(5, -2)
'Построение графика
For sngX = -5 To 5 Step 0.01
picGraph.PSet (sngX, Sin(sngX)), vbBlue
picGraph.PSet (sngX, sngX + 2), vbGreen
picGraph.PSet (sngX, sngX ^ 2), vbRed
picGraph.PSet (sngX, sngX ^ 3), vbMagenta
Next sngX
'Ось Х
picGraph.Line (-5, 0)-(5, 0)
For bytI = -5 To 5
picGraph.PSet (bytI, 0)
picGraph.Print bytI
Next bytI
'Ось Y
picGraph.Line (0, 2)-(0, -2)
For bytI = -2 To 2
picGraph.PSet (0, bytI)
picGraph.Print bytI
Next bytI
End Sub
