Sei sulla pagina 1di 1

Private Sub cmdSqrRoot_Click(ByVal sender As System.Object, ByVal e As System.Ev entArgs) Handles cmdSqrRoot.

Click 02 'Make sure the input box has a value 03 If txtInput.Text.Length <> 0 Then 04 'Assign our variable the value in the input box 05 tmpValue = CType(txtInput.Text, Double) 06 'Perform the square root 07 tmpValue = System.Math.Sqrt(tmpValue) 08 'Display the results in the input box 09 txtInput.Text = CType(tmpValue, String) 10 'Clear the decimal flag 11 hasDecimal = False 12 End If 13 End Sub

Potrebbero piacerti anche