Public Class Form1
    Dim a, b, c As Double
    Dim Дискирименант As Double
    Dim Возводим As Double
    Dim Умножаем As Double
    Dim x1 As Double, x2 As Double
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox1.Text = "" And TextBox2.Text = "" And TextBox3.Text = "" Then
            MsgBox("Не верно. Заполните все поля")
        Else
            Возводим = Math.Pow(TextBox2.Text, 2)
            Умножаем = Val(TextBox1.Text) * Val(TextBox3.Text) * Val(4)
            Дискирименант = Val(Возводим) - Val(Умножаем)
            a = TextBox1.Text
            b = TextBox2.Text
            c = TextBox3.Text
            TextBox6.Text = Дискирименант
            If Дискирименант < 0 Then
                Label9.Text = "< 0 - Корней нет"
            Else
                Label9.Text = "> 0 - Два корня"
                x1 = (-b + Math.Sqrt(Дискирименант)) / (2 * a)
                x2 = (-b - Math.Sqrt(Дискирименант)) / (2 * a)
                TextBox4.Text = x1
                TextBox5.Text = x2
            End If
        End If
     End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.Text = ""
        TextBox2.Text = ""
        TextBox3.Text = ""
        TextBox4.Text = ""
        TextBox5.Text = ""
        TextBox6.Text = ""
        Label9.Text = ""
    End Sub
End Class
