VERSION 5.00
Begin VB.Form frm1 
   BackColor       =   &H00C0FFFF&
   Caption         =   "Бросание тела"
   ClientHeight    =   6015
   ClientLeft      =   3570
   ClientTop       =   1605
   ClientWidth     =   5820
   DrawWidth       =   5
   BeginProperty Font 
      Name            =   "MS Sans Serif"
      Size            =   9.75
      Charset         =   204
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   ScaleHeight     =   106.098
   ScaleMode       =   6  'Millimeter
   ScaleWidth      =   102.658
   Begin VB.TextBox txtL 
      Alignment       =   1  'Right Justify
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   720
      TabIndex        =   15
      Top             =   1920
      Width           =   732
   End
   Begin VB.TextBox txtS 
      Alignment       =   1  'Right Justify
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   720
      TabIndex        =   6
      Top             =   1320
      Width           =   732
   End
   Begin VB.TextBox txtV0 
      Alignment       =   1  'Right Justify
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   720
      TabIndex        =   5
      Top             =   120
      Width           =   732
   End
   Begin VB.PictureBox pic1 
      BackColor       =   &H00FFFFFF&
      DrawWidth       =   3
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   3252
      Left            =   120
      ScaleHeight     =   3195
      ScaleWidth      =   5475
      TabIndex        =   4
      Top             =   2520
      Width           =   5532
   End
   Begin VB.CommandButton CmdCalc 
      Caption         =   "Бросок"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   612
      Left            =   2280
      TabIndex        =   3
      Top             =   840
      Width           =   1212
   End
   Begin VB.TextBox txtX 
      Alignment       =   1  'Right Justify
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   3960
      TabIndex        =   2
      Top             =   120
      Width           =   1212
   End
   Begin VB.TextBox txtM 
      Alignment       =   1  'Right Justify
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   3720
      TabIndex        =   1
      Top             =   840
      Width           =   1932
   End
   Begin VB.TextBox txtA 
      Alignment       =   1  'Right Justify
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   720
      TabIndex        =   0
      Top             =   720
      Width           =   732
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFFFF&
      Caption         =   "м"
      Height          =   375
      Left            =   1560
      TabIndex        =   17
      Top             =   1920
      Width           =   495
   End
   Begin VB.Label lblL 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFFF&
      Caption         =   "L"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   120
      TabIndex        =   16
      Top             =   1920
      Width           =   495
   End
   Begin VB.Label lbl4 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFFF&
      Caption         =   "X"
      Height          =   372
      Left            =   3360
      TabIndex        =   14
      Top             =   120
      Width           =   492
   End
   Begin VB.Label lbl5 
      BackColor       =   &H00FFFFFF&
      Caption         =   "м"
      Height          =   372
      Left            =   5280
      TabIndex        =   13
      Top             =   120
      Width           =   492
   End
   Begin VB.Label Label3 
      BackColor       =   &H00FFFFFF&
      Caption         =   "м"
      Height          =   372
      Left            =   1560
      TabIndex        =   12
      Top             =   1320
      Width           =   492
   End
   Begin VB.Label lbl2 
      BackColor       =   &H00FFFFFF&
      Caption         =   "град"
      Height          =   372
      Left            =   1560
      TabIndex        =   11
      Top             =   720
      Width           =   612
   End
   Begin VB.Label lbl1 
      BackColor       =   &H00FFFFFF&
      Caption         =   "м/с"
      Height          =   372
      Left            =   1560
      TabIndex        =   10
      Top             =   120
      Width           =   492
   End
   Begin VB.Label lblS 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFFF&
      Caption         =   "S"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   120
      TabIndex        =   9
      Top             =   1320
      Width           =   492
   End
   Begin VB.Label lblA 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFFF&
      Caption         =   "A"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   120
      TabIndex        =   8
      Top             =   720
      Width           =   492
   End
   Begin VB.Label lblV0 
      Alignment       =   2  'Center
      BackColor       =   &H00FFFFFF&
      Caption         =   "Vо"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   12
         Charset         =   204
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   120
      TabIndex        =   7
      Top             =   120
      Width           =   492
   End
End
Attribute VB_Name = "frm1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const G As Single = 9.81
Const Pi As Single = 3.14
Dim V0, A, S, L, T, X, Y As Double, I As Integer
Private Sub CmdCalc_Click()
'Ввод начальных значений
V0 = Val(txtV0.Text)
A = Val(txtA.Text)
S = Val(txtS.Text)
L = Val(txtL.Text)
'Попадание в площадку
X = V0 ^ 2 * Sin(2 * A * Pi / 180) / G
txtX.Text = X
Select Case X
Case Is < S
txtM.Text = "Недолет"
Case Is > S + L
txtM.Text = "Перелет"
Case Else
txtM.Text = "Попадание"
End Select
'Построение графика
For T = 0 To 10 Step 0.1
Y = V0 * Sin(A * Pi / 180) * T - G * T * T / 2
X = V0 * Cos(A * Pi / 180) * T
pic1.Scale (0, 10)-(40, -5)
pic1.PSet (X, Y)
Next T
'Ось X
pic1.Line (0, 0)-(40, 0)
For I = 0 To 40 Step 5
pic1.PSet (I, 0)
pic1.Print I
Next I
'Ось Y
pic1.Line (0, -5)-(0, 10)
For I = -5 To 10 Step 5
pic1.PSet (0, I)
pic1.Print I
Next I
'Площадка
pic1.Line (S, 0.2)-(S + L, 0.2)
End Sub

