VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4905
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6795
   LinkTopic       =   "Form1"
   ScaleHeight     =   4905
   ScaleWidth      =   6795
   StartUpPosition =   3  'Windows Default
   Begin VB.CommandButton Command2 
      Caption         =   "очиска"
      Height          =   495
      Left            =   5400
      TabIndex        =   2
      Top             =   4080
      Width           =   975
   End
   Begin VB.PictureBox Picture1 
      BackColor       =   &H00FFFFFF&
      Height          =   3135
      Left            =   240
      ScaleHeight     =   3075
      ScaleWidth      =   6075
      TabIndex        =   1
      Top             =   240
      Width           =   6135
   End
   Begin VB.CommandButton Command1 
      Caption         =   "выход"
      Height          =   375
      Left            =   5400
      TabIndex        =   0
      Top             =   3600
      Width           =   975
   End
   Begin VB.Label Label2 
      Height          =   495
      Left            =   240
      TabIndex        =   4
      Top             =   4200
      Width           =   2295
   End
   Begin VB.Label Label1 
      Height          =   375
      Left            =   240
      TabIndex        =   3
      Top             =   3600
      Width           =   2295
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim XX(1 To 4) As Single, YY(1 To 4) As Single
Dim i As Integer

Private Sub Command1_Click()
End
End Sub

Private Sub form1_Click()

End Sub

Private Sub Text1_Change()

End Sub

Private Sub Command2_Click()
Picture1.Cls
End Sub

Private Sub Form_Load()
Picture1.Scale (0, 0)-(100, 100)
For i = 1 To 3
XX(i) = 0
YY(i) = 0
Next
i = 0
End Sub

Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
i = i + 1
If i > 3 Then i = 1
XX(i) = X
YY(i) = Y
Label1.Caption = "X = " + Str(XX(i))
Label2.Caption = "Y = " + Str(YY(i))

If i > 2 Then
Picture1.Line (XX(1), YY(1))-(XX(2), YY(2)), 255
Picture1.Line (XX(2), YY(2))-(XX(3), YY(3)), 255
Picture1.Line (XX(3), YY(3))-(XX(1), YY(1)), 255

End If



End Sub

