VERSION 5.00 Begin VB.Form Form1 BackColor = &H80000003& BorderStyle = 0 'None Caption = "Koordin" ClientHeight = 1335 ClientLeft = 0 ClientTop = 0 ClientWidth = 4695 Icon = "Koordin.frx":0000 LinkTopic = "Form1" ScaleHeight = 1335 ScaleWidth = 4695 StartUpPosition = 2 'CenterScreen Begin VB.CommandButton Command5 Caption = "Исследовать координаты точки" Height = 255 Left = 120 TabIndex = 1 ToolTipText = "Исследовать координаты точки" Top = 960 Width = 4455 End Begin VB.CommandButton Command4 Caption = "Ввести координаты точки" Default = -1 'True Height = 255 Left = 120 TabIndex = 0 ToolTipText = "Ввести координаты точки" Top = 600 Width = 4455 End Begin VB.CommandButton Command3 Enabled = 0 'False Height = 855 Left = 0 TabIndex = 5 Top = 480 Width = 4695 End Begin VB.CommandButton Command2 Caption = "_" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 3960 TabIndex = 2 ToolTipText = "Свернуть" Top = 120 Width = 255 End Begin VB.CommandButton Command1 Cancel = -1 'True Caption = "X" BeginProperty Font Name = "MS Sans Serif" Size = 8.25 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 255 Left = 4320 TabIndex = 3 ToolTipText = "Выход" Top = 120 Width = 255 End Begin VB.Image Image1 Height = 255 Left = 120 Picture = "Koordin.frx":0442 Stretch = -1 'True Top = 120 Width = 255 End Begin VB.Label Label1 BackColor = &H80000002& BorderStyle = 1 'Fixed Single Caption = " Координаты точки" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty ForeColor = &H80000009& Height = 375 Left = 60 TabIndex = 4 Top = 60 Width = 4575 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Dim aX, aY, y1, y2 Private Sub Command1_Click() End End Sub Private Sub Command2_Click() Form1.WindowState = 1 End Sub Private Sub Command4_Click() aX = Val(InputBox("Введите координату Х точки", "Ввод данных", "-1")) aY = Val(InputBox("Введите координату Y точки", "Ввод данных", "-1")) End Sub Private Sub Command5_Click() y1 = -3 / 2 * (aX + 4) y2 = 3 / 2 * (aX - 4) If aY >= y1 And aY >= y2 And aY <= 0 Then MsgBox "Точка Т(" & aX & ";" & aY & ") входит в треугольник с вершинами А(-4;0), B(0;-6), C(4;0)", , "Исследование завершено" Else MsgBox "Точка Т(" & aX & ";" & aY & ") не входит в треугольник с вершинами А(-4;0), B(0;-6), C(4;0)", , "Исследование завершено" End If End Sub Private Sub Form_Load() aX = Fix(Rnd * 10 - 5) aY = Fix(Rnd * 16 - 8) End Sub