Private Sub Command1_Click()
Dim a, b, c, dlt As Single
a = Val(Text1.Text)
b = Val(Text2.Text)
c = Val(Text3.Text)
dlt = b ^ 2 - 4 * a * c
If dlt >= 0 And Option1.Value = True Then
Text4.Text = Round((-b + Sqr(dlt)) / (2 * a), 2)
Text5.Text = Round((-b - Sqr(dlt)) / (2 * a), 2)
End If
If dlt >= 0 And Option2.Value = True Then
Text4.Text = (-b + Sqr(dlt)) / (2 * a)
Text5.Text = (-b - Sqr(dlt)) / (2 * a)
End If
If dlt < 0 Then
Text4.Text = "无解"
Text5.Text = "无解"
frame.capiton="无解" ''这里添加就OK了.
else
frame.capiton="有解"
End If
End Sub
frame.capiton="有/无解"
或者在FRAME内加一个label.....来显示