Calcular el área de un triangulo



como calcular el área de un triangulo diseñado por VICTOR GONZALEZ de 12 años estudiante de
programación  (Visual Basic)
Public Class Area
    Dim nun1 As Double
    Dim nun2 As Double
    Dim res As Double
    Private Sub Ok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Ok.Click
        nun1 = Val(TextBox1.Text)
        nun2 = Val(TextBox2.Text)
        res = (nun1 * nun2) / 2
        Label3.Text = res
        Label4.Text = nun1
        Label5.Text = nun2 / 2
        PictureBox1.BackColor = Color.IndianRed
    End Sub
    Private Sub Limpiar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Limpiar.Click
        TextBox1.Clear()
        TextBox2.Clear()
        Label3.Text = ""
        PictureBox1.BackColor = Color.Indigo
    End Sub
    Private Sub Salir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Salir.Click
        End
    End Sub
    Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PictureBox1.Click
    End Sub
    Private Sub Label3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label3.Click
    End Sub
    Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
        Me.Width = 492
        PictureBox1.BackColor = Color.DarkCyan
    End Sub
    Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
        PictureBox1.BackColor = Color.Aquamarine
        Me.Width = 774
    End Sub
    Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        If Not IsNumeric(TextBox1.Text) Then
            TextBox1.Clear()
        End If
    End Sub
    Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged
        If Not IsNumeric(TextBox2.Text) Then
            TextBox2.Clear()
        End If
    End Sub








Comentarios

Entradas populares de este blog

codigo para calcular area de un triangulo

Qué son las extensiones de archivos

Como hacer una Calculadora con Vsual Basic 2010.net