VERSION 5.00
Begin VB.Form frm1 
   BackColor       =   &H00C00000&
   Caption         =   "Управление c авт. обрат. связью"
   ClientHeight    =   2565
   ClientLeft      =   4140
   ClientTop       =   3300
   ClientWidth     =   4050
   DrawWidth       =   3
   LinkTopic       =   "Form1"
   ScaleHeight     =   2565
   ScaleWidth      =   4050
   Begin VB.TextBox txtY 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   3000
      TabIndex        =   4
      Top             =   1080
      Width           =   612
   End
   Begin VB.TextBox txtX 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   2280
      TabIndex        =   3
      Top             =   1080
      Width           =   612
   End
   Begin VB.CommandButton cmd2 
      Caption         =   "Шаг"
      Height          =   372
      Left            =   2400
      TabIndex        =   2
      Top             =   1800
      Width           =   1092
   End
   Begin VB.PictureBox pic1 
      BackColor       =   &H00FFFFFF&
      DrawWidth       =   3
      Height          =   1812
      Left            =   240
      ScaleHeight     =   1755
      ScaleWidth      =   1755
      TabIndex        =   1
      Top             =   360
      Width           =   1812
   End
   Begin VB.CommandButton cmdP 
      Caption         =   "Упр. объект"
      Height          =   372
      Left            =   2400
      TabIndex        =   0
      Top             =   360
      Width           =   1092
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim bytX1, bytY1, bytX2, bytY2 As Byte
Private Sub cmdP_Click()
pic1.Scale (0, 20)-(20, 0)
bytX2 = 10
bytY2 = 10
pic1.Circle (bytX2, bytY2), 5
bytX1 = Int(Rnd * 20)
bytY1 = Int(Rnd * 20)
txtX.Text = bytX1
txtY.Text = bytY1
pic1.PSet (bytX1, bytY1), vbRed
End Sub
Private Sub cmd2_Click()
pic1.Scale (0, 20)-(20, 0)
Select Case bytX2 - bytX1
Case Is > 0
bytX1 = bytX1 + 1
Case Is < 0
bytX1 = bytX1 - 1
Case Is = 0
bytX1 = bytX1
End Select
Select Case bytY2 - bytY1
Case Is > 0
bytY1 = bytY1 + 1
Case Is < 0
bytY1 = bytY1 - 1
Case Is = 0
bytY1 = bytY1
End Select
txtX.Text = bytX1
txtY.Text = bytY1
pic1.PSet (bytX1, bytY1), vbBlack
End Sub
