VERSION 5.00
Begin VB.Form frm1 
   BackColor       =   &H00004040&
   Caption         =   "Графический редактор"
   ClientHeight    =   4356
   ClientLeft      =   2724
   ClientTop       =   2340
   ClientWidth     =   6600
   LinkTopic       =   "Form1"
   PaletteMode     =   2  'Custom
   ScaleHeight     =   4356
   ScaleWidth      =   6600
   Begin VB.TextBox txtY 
      Height          =   375
      Left            =   4800
      TabIndex        =   10
      Top             =   3720
      Width           =   495
   End
   Begin VB.TextBox txtX 
      Height          =   375
      Left            =   120
      TabIndex        =   9
      Top             =   120
      Width           =   495
   End
   Begin VB.PictureBox picPaint 
      BackColor       =   &H00FFFFFF&
      DrawWidth       =   5
      Height          =   4000
      Left            =   720
      ScaleHeight     =   3945
      ScaleMode       =   0  'User
      ScaleWidth      =   3495.017
      TabIndex        =   0
      Top             =   120
      Width           =   4000
   End
   Begin VB.Label lblY2ReZ 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      BorderStyle     =   1  'Fixed Single
      Height          =   375
      Left            =   5400
      TabIndex        =   8
      Top             =   2400
      Width           =   975
   End
   Begin VB.Label lblX2Rez 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      BorderStyle     =   1  'Fixed Single
      Height          =   375
      Left            =   5400
      TabIndex        =   7
      Top             =   1920
      Width           =   975
   End
   Begin VB.Label lblY1Rez 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      BorderStyle     =   1  'Fixed Single
      Height          =   375
      Left            =   5400
      TabIndex        =   6
      Top             =   1080
      Width           =   975
   End
   Begin VB.Label lblX1Rez 
      Alignment       =   1  'Right Justify
      BackColor       =   &H00FFFFFF&
      BorderStyle     =   1  'Fixed Single
      Height          =   375
      Left            =   5400
      TabIndex        =   5
      Top             =   600
      Width           =   975
   End
   Begin VB.Label lblY2 
      Alignment       =   2  'Center
      BackColor       =   &H00C0FFC0&
      Caption         =   "Y2"
      Height          =   375
      Left            =   5040
      TabIndex        =   4
      Top             =   2400
      Width           =   255
   End
   Begin VB.Label lblX2 
      Alignment       =   2  'Center
      BackColor       =   &H00C0FFC0&
      Caption         =   "X2"
      Height          =   375
      Left            =   5040
      TabIndex        =   3
      Top             =   1920
      Width           =   255
   End
   Begin VB.Label lblY1 
      Alignment       =   2  'Center
      BackColor       =   &H00C0FFC0&
      Caption         =   "Y1"
      Height          =   375
      Left            =   5040
      TabIndex        =   2
      Top             =   1080
      Width           =   255
   End
   Begin VB.Label lblX1 
      Alignment       =   2  'Center
      BackColor       =   &H00C0FFC0&
      Caption         =   "X1"
      Height          =   375
      Left            =   5040
      TabIndex        =   1
      Top             =   600
      Width           =   255
   End
   Begin VB.Menu mnuScale 
      Caption         =   "Масштаб"
      Begin VB.Menu mnu100 
         Caption         =   "100*100"
      End
      Begin VB.Menu mnu1000 
         Caption         =   "1000*1000"
      End
   End
   Begin VB.Menu mnuPrimitive 
      Caption         =   "Графический примитив"
      Begin VB.Menu mnuPoint 
         Caption         =   "Точка"
      End
      Begin VB.Menu mnuLine 
         Caption         =   "Прямая"
      End
      Begin VB.Menu mnuLineB 
         Caption         =   "Прямоугольник"
      End
      Begin VB.Menu mnuLineBF 
         Caption         =   "Закрашенный прямоугольник"
      End
      Begin VB.Menu mnuCircle 
         Caption         =   "Окружность"
      End
   End
   Begin VB.Menu mnuEdit 
      Caption         =   "Правка"
      Begin VB.Menu mnuClear 
         Caption         =   "Очистить"
      End
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public sngX1, sngX2, sngY1, sngY2, sngX, sngY As Single
Private Sub picPaint_MouseDown(Button As Integer, Shift As Integer, sngX As Single, sngY As Single)
Select Case Button
Case Is = 1
sngX1 = sngX: sngY1 = sngY: lblX1Rez = sngX1: lblY1Rez = sngY1
Case Is = 2
sngX2 = sngX: sngY2 = sngY: lblX2Rez = sngX2: lblY2ReZ = sngY2
End Select
End Sub
Private Sub mnu100_Click()
picPaint.Scale (0, 100)-(100, 0)
txtX = 100
txtY = 100
End Sub
Private Sub mnu1000_Click()
picPaint.Scale (0, 1000)-(1000, 0)
txtX = 1000
txtY = 1000
End Sub
Private Sub mnuPoint_Click()
picPaint.PSet (sngX1, sngY1), vbBlue
End Sub
Private Sub mnuLine_Click()
picPaint.Line (sngX1, sngY1)-(sngX2, sngY2), vbGreen
End Sub
Private Sub mnuLineB_Click()
picPaint.Line (sngX1, sngY1)-(sngX2, sngY2), vbRed, B
End Sub
Private Sub mnuLineBF_Click()
picPaint.Line (sngX1, sngY1)-(sngX2, sngY2), vbMagenta, BF
End Sub
Private Sub mnuCircle_Click()
picPaint.Circle (sngX1, sngY1), sngX2, vbCyan
End Sub
Private Sub mnuClear_Click()
picPaint.Cls
End Sub
