100% found this document useful (1 vote)
33 views

Programa 3 Visual1

This document describes a Visual Studio 2010 program that opens an image depending on triangle data and calculates its area. The program contains text boxes and labels to input triangle side lengths and height/base, calculates the area formula, and displays the appropriate image for equilateral, isosceles, or scalene triangles based on the side length comparisons. Event handlers are defined but left empty for future implementation.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
33 views

Programa 3 Visual1

This document describes a Visual Studio 2010 program that opens an image depending on triangle data and calculates its area. The program contains text boxes and labels to input triangle side lengths and height/base, calculates the area formula, and displays the appropriate image for equilateral, isosceles, or scalene triangles based on the side length comparisons. Event handlers are defined but left empty for future implementation.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Programa 3

Programa en Visual Studio 2010 que abre una imagen dependiendo de los datos del triángulo y da su
area

Public Class Form1

Public Class Form1

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles


MyBase.Load
PictureBox1.Visible = False
PictureBox2.Visible = False
PictureBox3.Visible = False
End Sub

Private Sub TextBox4_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox4.TextChanged

End Sub

Private Sub Label6_Click(sender As System.Object, e As System.EventArgs) Handles


Label6.Click

End Sub

Private Sub PictureBox1_Click(sender As System.Object, e As System.EventArgs)


Handles PictureBox1.Click

End Sub

Private Sub TextBox6_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox6.TextChanged

End Sub

Private Sub TextBox7_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox7.TextChanged

End Sub

Private Sub Label7_Click(sender As System.Object, e As System.EventArgs) Handles


Label7.Click

End Sub

Private Sub Label8_Click(sender As System.Object, e As System.EventArgs) Handles


Label8.Click

End Sub

Private Sub TextBox1_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox1.TextChanged

End Sub

Private Sub Label2_Click(sender As System.Object, e As System.EventArgs) Handles


Label2.Click

End Sub

Private Sub Label3_Click(sender As System.Object, e As System.EventArgs) Handles


Label3.Click

End Sub

Private Sub TextBox2_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox2.TextChanged

End Sub

Private Sub TextBox3_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox3.TextChanged

End Sub

Private Sub Label4_Click(sender As System.Object, e As System.EventArgs) Handles


Label4.Click

End Sub

Private Sub Label5_Click(sender As System.Object, e As System.EventArgs) Handles


Label5.Click

End Sub

Private Sub TextBox5_TextChanged(sender As System.Object, e As System.EventArgs)


Handles TextBox5.TextChanged

End Sub

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles


Button1.Click
Dim area, base, altura, lado1, lado2, lado3 As Double
base = TextBox1.Text altura = TextBox2.Text
lado1 = TextBox3.Text lado2 = TextBox4.Text
lado3 = TextBox5.Text area = base * altura / 2
TextBox6.Text = area
If (lado1 = lado2) And (lado2 = lado3) Then
TextBox7.Text = "Equilatero"
PictureBox1.Visible = True
End If

If (lado1 = lado2) And (lado2 <> lado3) Then


TextBox7.Text = "Isoceles"
PictureBox3.Visible = True
End If

If (lado1 <> lado2) And (lado2 <> lado3) Then


TextBox7.Text = "Escaleno"
PictureBox2.Visible = True
End If

End Sub

Private Sub PictureBox2_Click(sender As System.Object, e As System.EventArgs)


Handles PictureBox2.Click

End Sub

Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles PictureBox3.Click

End Sub
End Class

You might also like