VERSION 5.00 Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX" Begin VB.Form Form1 BorderStyle = 0 'None Caption = "Form1" ClientHeight = 3120 ClientLeft = 0 ClientTop = 0 ClientWidth = 4695 LinkTopic = "Form1" ScaleHeight = 3120 ScaleWidth = 4695 ShowInTaskbar = 0 'False StartUpPosition = 3 'Windows Default Begin VB.CommandButton Command2 Cancel = -1 'True Caption = "X" BeginProperty Font Name = "MS Sans Serif" Size = 12 Charset = 204 Weight = 700 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 4260 TabIndex = 8 Top = 2640 Width = 375 End Begin VB.CommandButton Command1 Caption = "&Вычислить" Default = -1 'True BeginProperty Font Name = "MS Sans Serif" Size = 9.75 Charset = 204 Weight = 400 Underline = 0 'False Italic = 0 'False Strikethrough = 0 'False EndProperty Height = 375 Left = 60 TabIndex = 7 Top = 2640 Width = 4155 End Begin VB.PictureBox Picture1 Height = 1455 Left = 60 ScaleHeight = 1395 ScaleWidth = 4515 TabIndex = 6 Top = 1080 Width = 4575 End Begin MSComctlLib.Slider Slider3 Height = 255 Left = 3060 TabIndex = 5 ToolTipText = "Сторона C" Top = 720 Width = 1575 _ExtentX = 2778 _ExtentY = 450 _Version = 393216 End Begin MSComctlLib.Slider Slider2 Height = 255 Left = 1560 TabIndex = 4 ToolTipText = "Сторона B" Top = 720 Width = 1575 _ExtentX = 2778 _ExtentY = 450 _Version = 393216 End Begin MSComctlLib.Slider Slider1 Height = 255 Left = 60 TabIndex = 3 ToolTipText = "Сторона A" Top = 720 Width = 1575 _ExtentX = 2778 _ExtentY = 450 _Version = 393216 End Begin VB.Frame Frame1 Height = 615 Left = 60 TabIndex = 0 Top = 0 Width = 4575 Begin VB.CheckBox Check1 Caption = "&Формат" Height = 255 Left = 3480 TabIndex = 9 ToolTipText = "Включить форматирование" Top = 240 Width = 1035 End Begin VB.OptionButton Option2 Caption = "S-&прямоугольника" Height = 255 Left = 120 TabIndex = 1 Top = 240 Value = -1 'True Width = 1755 End Begin VB.OptionButton Option1 Caption = "S-&треугольника" Height = 255 Left = 1920 TabIndex = 2 Top = 240 Width = 1515 End End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) End Sub Private Sub Command1_Click() Picture1.Cls If Option2.Value Then a = Slider1.Value b = Slider2.Value S = a * b Picture1.Print "Площадь прямоугольника = " & S Else a = Slider1.Value b = Slider2.Value c = Slider3.Value If (a + b) < c Or (a + c) < b Or (b + c) < a Then Picture1.Print "Треугольника не существует" Else p = (a + b + c) / 2 S = (p * (p - a) * (p - b) * (p - c)) ^ (1 / 2) If Check1.Value Then Picture1.Print "Площадь треугольника= " & Format(S, "#####################.###") Else Picture1.Print "Площадь треугольника= " & S End If End If End If End Sub Private Sub Command2_Click() End End Sub Private Sub Form_Load() Slider3.Visible = False End Sub Private Sub Option1_Click() Slider3.Visible = True End Sub Private Sub Option2_Click() Slider3.Visible = False End Sub