Take the numbers from both the textboxes, then put them into integers and have the sum, product, etc. put into a sum variable then just output a concatenated string using the three variables into the textbox for the formula.
What you what to make the calculation is a Event Handler for the the button click.
Below is an example of the button click handler for the addition button. I encourage you not to just copy and paste but to write your own. I have written some comments so you know what each line is doing.
'Addition Button Handler
Private Sub AdditionButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AdditionButton.Click
'Declare Variable for First Number and take what is in The First Number TextBox
'and Parse it into an Integer Value and place it into the variable FirstNumber
Dim FirstNumber As Integer = Integer.Parse(FirstNumberTextBox.Text)
'Same as the First Number but now for the second
Dim SecondNumber As Integer = Integer.Parse(SecondNumberTextBox.Text)
Dim Sum As Integer 'Declare a variable for the Sum
Sum = FirstNumber + SecondNumber 'Add the First and Second Number and put it into the Sum variable
FormulaTextBox.Text = (FirstNumber & " + " & SecondNumber & " = " & Sum).ToString()
'Output into the Formula TextBox the concatenated string of The FirstNumber with a + then the second
'Number and an equals sign then the sum
As for the textbox containing the formula to be cleared when the text is changed, you will want to have a TextChanged event handler for either each textbox or just one that handles both textboxes that clears the text in the Formula TextBoxEdited by -Inferno - 6/6/11 at 10:16pm