VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   6195
   ClientLeft      =   1425
   ClientTop       =   1665
   ClientWidth     =   7350
   LinkTopic       =   "Form1"
   ScaleHeight     =   6195
   ScaleWidth      =   7350
   Begin VB.VScrollBar VScroll2 
      Height          =   855
      Left            =   6960
      Max             =   10
      TabIndex        =   15
      Top             =   5160
      Value           =   2
      Width           =   255
   End
   Begin VB.HScrollBar HScroll3 
      Height          =   255
      Left            =   5760
      Max             =   10
      TabIndex        =   14
      Top             =   5760
      Value           =   1
      Width           =   975
   End
   Begin VB.CommandButton Command7 
      Caption         =   "График4"
      Height          =   375
      Left            =   4800
      TabIndex        =   13
      Top             =   5760
      Width           =   855
   End
   Begin VB.CommandButton Command6 
      Caption         =   "График3"
      Height          =   375
      Left            =   4800
      TabIndex        =   12
      Top             =   5400
      Width           =   855
   End
   Begin VB.CommandButton Command5 
      Caption         =   "Cliar"
      Height          =   375
      Left            =   5760
      TabIndex        =   11
      Top             =   5040
      Width           =   615
   End
   Begin VB.CommandButton Command4 
      Caption         =   "График2"
      Height          =   375
      Left            =   4800
      TabIndex        =   10
      Top             =   5040
      Width           =   855
   End
   Begin VB.VScrollBar VScroll1 
      Height          =   4455
      Left            =   120
      Max             =   20
      Min             =   1
      TabIndex        =   6
      Top             =   0
      Value           =   2
      Width           =   255
   End
   Begin VB.CommandButton Command2 
      Caption         =   "Greed"
      Height          =   375
      Left            =   5760
      TabIndex        =   5
      Top             =   4680
      Width           =   615
   End
   Begin VB.HScrollBar HScroll2 
      Height          =   255
      Left            =   120
      Max             =   50
      TabIndex        =   4
      Top             =   5040
      Value           =   50
      Width           =   1815
   End
   Begin VB.HScrollBar HScroll1 
      Height          =   255
      Left            =   120
      Max             =   0
      Min             =   -50
      TabIndex        =   3
      Top             =   4680
      Value           =   -50
      Width           =   1815
   End
   Begin VB.PictureBox PicGraph 
      BackColor       =   &H00FFFFFF&
      Height          =   4455
      Left            =   480
      ScaleHeight     =   4395
      ScaleWidth      =   6795
      TabIndex        =   2
      Top             =   0
      Width           =   6855
   End
   Begin VB.CommandButton Command3 
      Caption         =   "Выход"
      Height          =   375
      Left            =   6480
      TabIndex        =   1
      Top             =   4680
      Width           =   735
   End
   Begin VB.CommandButton Command1 
      Caption         =   "График1"
      Height          =   375
      Left            =   4800
      TabIndex        =   0
      Top             =   4680
      Width           =   855
   End
   Begin VB.Label Label5 
      Caption         =   "b"
      Height          =   255
      Left            =   6120
      TabIndex        =   17
      Top             =   5520
      Width           =   255
   End
   Begin VB.Label Label4 
      Caption         =   "a"
      Height          =   255
      Left            =   6720
      TabIndex        =   16
      Top             =   5160
      Width           =   135
   End
   Begin VB.Label Label3 
      Alignment       =   2  'Center
      Height          =   255
      Left            =   2040
      TabIndex        =   9
      Top             =   5040
      Width           =   2535
   End
   Begin VB.Label Label2 
      Alignment       =   2  'Center
      Height          =   255
      Left            =   2040
      TabIndex        =   8
      Top             =   4680
      Width           =   2535
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   615
      Left            =   120
      TabIndex        =   7
      Top             =   5400
      Width           =   4695
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
PicGraph.Scale (HScroll1.Value, VScroll1.Value)-(HScroll2.Value, -VScroll1.Value)

PicGraph.Line (HScroll1.Value, 0)-(HScroll2.Value, 0)
For i = HScroll1.Value To HScroll2.Value Step 10
PicGraph.PSet (i, 0)
PicGraph.Print i
Next
PicGraph.Line (0, VScroll1.Value)-(0, -VScroll1.Value)
For i = -VScroll1.Value To VScroll1.Value
PicGraph.PSet (0, i)
PicGraph.Print i
Next
For ix = HScroll1.Value To HScroll2.Value Step 0.01
PicGraph.PSet (ix, (Sin(ix)) * (1 / Exp(0.1 * ix))), vbMagenta
Next
info = "y=Sin(x) * (1 / Exp(0.1 * x))"
Label1.Caption = info
Label2.Caption = "Xmin=" + Str(HScroll1.Value)
Label3.Caption = "Xmax=" + Str(HScroll2.Value)
End Sub

Private Sub Command2_Click()
'PicGraph.Cls
PicGraph.Scale (HScroll1.Value, VScroll1.Value)-(HScroll2.Value, -VScroll1.Value)
For i = HScroll1.Value To HScroll2.Value
PicGraph.Line (i, VScroll1.Value)-(i, -VScroll1.Value), &H8000000F
Next
For i = -VScroll1.Value To VScroll1.Value Step 0.2
PicGraph.Line (HScroll1.Value, i)-(HScroll2.Value, i), &H8000000F
Next
info = ""
Label1.Caption = info
Label2.Caption = ""
Label3.Caption = ""

End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Command4_Click()
PicGraph.Scale (HScroll1.Value, VScroll1.Value)-(HScroll2.Value, -VScroll1.Value)
'PicGraph.Cls
'For i = HScroll1.Value To HScroll2.Value
'PicGraph.Line (i, VScroll1.Value)-(i, -VScroll1.Value), vbGreen
'Next
'For i = -VScroll1.Value To VScroll1.Value Step 0.2
'PicGraph.Line (HScroll1.Value, i)-(HScroll2.Value, i), vbGreen
'Next
PicGraph.Line (HScroll1.Value, 0)-(HScroll2.Value, 0)
For i = HScroll1.Value To HScroll2.Value Step 10
PicGraph.PSet (i, 0)
PicGraph.Print i
Next
PicGraph.Line (0, VScroll1.Value)-(0, -VScroll1.Value)
For i = -VScroll1.Value To VScroll1.Value
PicGraph.PSet (0, i)
PicGraph.Print i
Next
For ix = HScroll1.Value To HScroll2.Value Step 0.01
PicGraph.PSet (ix, ((Sin(100 * ix)) * Cos(ix / 10))), vbRed
Next
info = "y=Sin(x/10) * Cos(ix / 10)"
Label1.Caption = info
Label2.Caption = "Xmin=" + Str(HScroll1.Value)
Label3.Caption = "Xmax=" + Str(HScroll2.Value)

End Sub

Private Sub Command5_Click()
PicGraph.Cls

End Sub

Private Sub Command6_Click()
PicGraph.Scale (HScroll1.Value, VScroll1.Value)-(HScroll2.Value, -VScroll1.Value)
PicGraph.Line (HScroll1.Value, 0)-(HScroll2.Value, 0)
For i = HScroll1.Value To HScroll2.Value Step 10
PicGraph.PSet (i, 0)
PicGraph.Print i
Next
PicGraph.Line (0, VScroll1.Value)-(0, -VScroll1.Value)
For i = -VScroll1.Value To VScroll1.Value
PicGraph.PSet (0, i)
PicGraph.Print i
Next
For ix = HScroll1.Value To HScroll2.Value Step 0.01
PicGraph.PSet (ix, ((1 / Exp(0.1 * ix)) * Cos(ix))), vbBlue
Next
info = "y=1 / Exp(0.1 * x) * Cos(x)"
Label1.Caption = info
Label2.Caption = "Xmin=" + Str(HScroll1.Value)
Label3.Caption = "Xmax=" + Str(HScroll2.Value)

End Sub

Private Sub Command7_Click()
pi = 3.141528
PicGraph.Scale (HScroll1.Value / 5, VScroll1.Value * 5)-(HScroll2.Value / 5, -VScroll1.Value * 5)
PicGraph.Line (HScroll1.Value / 5, 0)-(HScroll2.Value / 5, 0)
For i = HScroll1.Value / 5 To HScroll2.Value / 5
PicGraph.PSet (i, 0)
PicGraph.Print i
Next
PicGraph.Line (0, VScroll1.Value * 5)-(0, -VScroll1.Value * 5)
For i = -VScroll1.Value * 5 To VScroll1.Value * 5
PicGraph.PSet (0, i)
PicGraph.Print i
Next
For x = 0 To 2 * pi Step 0.01
PicGraph.PSet (HScroll3.Value * Sin(x), VScroll2.Value * Cos(x)), vbGreen
Next
info = "y=" + Str(HScroll3.Value) + "*Sin(x), x=" + Str(VScroll2.Value) + "*Cos(x)"
Label1.Caption = info
Label2.Caption = "Xmin=" + Str(HScroll1.Value / 5)
Label3.Caption = "Xmax=" + Str(HScroll2.Value / 5)

End Sub

Private Sub Form_Click()
Form2.Visible = True
End Sub

Private Sub Form_Load()
'PicGraph.Scale (-10, 2)-(10, -2)
PicGraph.Scale (HScroll1.Value, VScroll1.Value)-(HScroll2.Value, -VScroll1.Value)

End Sub

Private Sub Form_Resize()
PicGraph.Left = ScaleWidth - 6900
PicGraph.Scale (0, 0)-(ScaleWidth, ScaleHeight)
End Sub

Private Sub HScroll1_Change()
PicGraph.Scale (HScroll1.Value, VScroll1.Value)-(HScroll2.Value, -VScroll1.Value)
PicGraph.Cls

For i = HScroll1.Value To HScroll2.Value
PicGraph.Line (i, VScroll1.Value)-(i, -VScroll1.Value), &H8000000F
Next

For i = -VScroll1.Value To VScroll1.Value Step 0.2
PicGraph.Line (HScroll1.Value, i)-(HScroll2.Value, i), &H8000000F
Next

PicGraph.Line (HScroll1.Value, 0)-(HScroll2.Value, 0)
For i = HScroll1.Value To HScroll2.Value Step 10
PicGraph.PSet (i, 0)
PicGraph.Print i
Next

PicGraph.Line (0, VScroll1.Value)-(0, -VScroll1.Value)
For i = -VScroll1.Value To VScroll1.Value
PicGraph.PSet (0, i)
PicGraph.Print i
Next
For ix = HScroll1.Value To HScroll2.Value Step 0.01
PicGraph.PSet (ix, (Sin(ix)) * (1 / Exp(0.1 * ix))), vbRed
Next
info = "y=Sin(x) * (1 / Exp(0.1 * x))"
Label1.Caption = info
Label2.Caption = "Xmin=" + Str(HScroll1.Value)
Label3.Caption = "Xmax=" + Str(HScroll2.Value)

End Sub

Private Sub HScroll2_Change()
PicGraph.Scale (HScroll1.Value, VScroll1.Value)-(HScroll2.Value, -VScroll1.Value)
PicGraph.Cls
For i = HScroll1.Value To HScroll2.Value
PicGraph.Line (i, VScroll1.Value)-(i, -VScroll1.Value), &H8000000F
Next
For i = -VScroll1.Value To VScroll1.Value Step 0.2
PicGraph.Line (HScroll1.Value, i)-(HScroll2.Value, i), &H8000000F
Next
PicGraph.Line (HScroll1.Value, 0)-(HScroll2.Value, 0)
For i = HScroll1.Value To HScroll2.Value Step 10
PicGraph.PSet (i, 0)
PicGraph.Print i
Next
PicGraph.Line (0, VScroll1.Value)-(0, -VScroll1.Value)
For i = -VScroll1.Value To VScroll1.Value
PicGraph.PSet (0, i)
PicGraph.Print i
Next
For ix = HScroll1.Value To HScroll2.Value Step 0.01
PicGraph.PSet (ix, (Sin(ix)) * (1 / Exp(0.1 * ix))), vbRed
Next
info = "y=Sin(x) * (1 / Exp(0.1 * x))"
Label1.Caption = info
Label2.Caption = "Xmin=" + Str(HScroll1.Value)
Label3.Caption = "Xmax=" + Str(HScroll2.Value)

End Sub

Private Sub HScroll3_Change()
pi = 3.141528
PicGraph.Scale (HScroll1.Value / 5, VScroll1.Value * 5)-(HScroll2.Value / 5, -VScroll1.Value * 5)
PicGraph.Line (HScroll1.Value / 5, 0)-(HScroll2.Value / 5, 0)
For i = HScroll1.Value / 5 To HScroll2.Value / 5
PicGraph.PSet (i, 0)
PicGraph.Print i
Next
PicGraph.Line (0, VScroll1.Value * 5)-(0, -VScroll1.Value * 5)
For i = -VScroll1.Value * 5 To VScroll1.Value * 5
PicGraph.PSet (0, i)
PicGraph.Print i
Next
For x = 0 To 2 * pi Step 0.01
PicGraph.PSet (HScroll3.Value * Sin(x), VScroll2.Value * Cos(x)), vbGreen
Next
info = "y=" + Str(HScroll3.Value) + "*Sin(x), x=" + Str(VScroll2.Value) + "*Cos(x)"
Label1.Caption = info
Label2.Caption = "Xmin=" + Str(HScroll1.Value / 5)
Label3.Caption = "Xmax=" + Str(HScroll2.Value / 5)

End Sub

Private Sub VScroll1_Change()
PicGraph.Scale (HScroll1.Value, VScroll1.Value)-(HScroll2.Value, -VScroll1.Value)

End Sub

Private Sub VScroll2_Change()
pi = 3.141528
PicGraph.Scale (HScroll1.Value / 5, VScroll1.Value * 5)-(HScroll2.Value / 5, -VScroll1.Value * 5)
PicGraph.Line (HScroll1.Value / 5, 0)-(HScroll2.Value / 5, 0)
For i = HScroll1.Value / 5 To HScroll2.Value / 5
PicGraph.PSet (i, 0)
PicGraph.Print i
Next
PicGraph.Line (0, VScroll1.Value * 5)-(0, -VScroll1.Value * 5)
For i = -VScroll1.Value * 5 To VScroll1.Value * 5
PicGraph.PSet (0, i)
PicGraph.Print i
Next
For x = 0 To 2 * pi Step 0.01
PicGraph.PSet (HScroll3.Value * Sin(x), VScroll2.Value * Cos(x)), vbGreen
Next
info = "y=" + Str(HScroll3.Value) + "*Sin(x), x=" + Str(VScroll2.Value) + "*Cos(x)"
Label1.Caption = info
Label2.Caption = "Xmin=" + Str(HScroll1.Value / 5)
Label3.Caption = "Xmax=" + Str(HScroll2.Value / 5)

End Sub
