Thanks for your reply, I tried this but it is OK if no values are entered and the calculate button is clicked, you do get the message box appear, but it takes three clicks on the 'OK' to get rid of it. If you enter one input and press calculate, all the text boxes have 'NaN' in them.
Code:#Region " Calculate all Data " Private Sub btnCalc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCalc.Click For aaa As Integer = 0 To 2 'I just repeated this 6 times because I have a lot of processing power 'you can do it twice. If TextBoxSidea.Text.Length = 0 And TextBoxSideb.Text.Length = 0 And TextBoxSidec.Text.Length = 0 And TextBoxAngleB.Text.Length = 0 And TextBoxAngleC.Text.Length = 0 Then MessageBox.Show("At least two known quantities are required") Else feedValues() PythagoreanTheorem() angleSums() angleBasWorkingAngle() findangleC() End If Next End Sub #End Region




Reply With Quote