Public Class Form1
    Dim a As Double
    Dim b As Double
    Dim kq As Double
    Private Sub TextBox1_TextChanged(sender As Object, e As EventArgs) Handles TextBox1.TextChanged
        a = CDbl(TextBox1.Text)
    End Sub
    Private Sub TextBox2_TextChanged(sender As Object, e As EventArgs) Handles TextBox2.TextChanged
        b = CDbl(TextBox2.Text)
    End Sub
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If a = 0 Then
            TextBox3.Text = CStr("ERROR")
        Else
            TextBox3.Text = CStr(-b / a)
        End If
    End Sub
End Class
