VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 4170 ClientLeft = 60 ClientTop = 450 ClientWidth = 5295 LinkTopic = "Form1" ScaleHeight = 4170 ScaleWidth = 5295 StartUpPosition = 3 'Windows Default Begin VB.CommandButton Command1 Caption = "Выход" Height = 255 Left = 240 TabIndex = 4 Top = 3840 Width = 4935 End Begin VB.Frame Frame1 Caption = "a*x^2+b*x+c=0" Height = 3615 Left = 240 TabIndex = 0 Top = 120 Width = 4935 Begin VB.PictureBox Picture1 Height = 255 Left = 1800 ScaleHeight = 195 ScaleWidth = 1275 TabIndex = 13 Top = 3120 Width = 1335 End Begin VB.TextBox Text5 Height = 285 Left = 3000 TabIndex = 10 Top = 2640 Width = 1815 End Begin VB.TextBox Text4 Height = 285 Left = 480 TabIndex = 9 Top = 2640 Width = 1935 End Begin VB.CommandButton Command2 Caption = "Решить" Height = 255 Left = 120 TabIndex = 8 Top = 2160 Width = 4695 End Begin VB.TextBox Text3 Height = 375 Left = 1560 TabIndex = 7 Top = 1680 Width = 3135 End Begin VB.TextBox Text2 Height = 375 Left = 1560 TabIndex = 6 Top = 960 Width = 3135 End Begin VB.TextBox Text1 Height = 405 Left = 1560 TabIndex = 5 Top = 240 Width = 3135 End Begin VB.Label Label5 Caption = "X2" Height = 255 Left = 2640 TabIndex = 12 Top = 2640 Width = 255 End Begin VB.Label Label4 Caption = "X1" Height = 255 Left = 120 TabIndex = 11 Top = 2640 Width = 255 End Begin VB.Label Label3 Caption = "Коэффициент С" Height = 255 Left = 120 TabIndex = 3 Top = 1680 Width = 1215 End Begin VB.Label Label2 Caption = "Коэффициент В" Height = 255 Left = 120 TabIndex = 2 Top = 1080 Width = 1335 End Begin VB.Label Label1 Caption = "Коэффициент А" Height = 255 Left = 120 TabIndex = 1 Top = 360 Width = 1335 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 Command1_Click() End End Sub Private Sub Command2_Click() Picture1.Cls a = Text1 b = Text2 c = Text3 d = b ^ 2 - 4 * a * c If d < 0 Then Picture1.Print "Решений нет" Else X1 = (-b + Sqr(d)) / (2 * a) X2 = (-b - Sqr(d)) / (2 * a) Text4 = X1 Text5 = X2 End If End Sub