0% found this document useful (0 votes)
62 views2 pages

Area Calculation Program Code

This document describes a program that calculates the areas of different shapes. It defines variables to store the length, radius, base, and height of shapes. Buttons are included to exit the program, clear the input fields, and calculate the area of a square, circle, and triangle based on the inputs. The calculated areas are then displayed on labels with two decimal places of precision.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views2 pages

Area Calculation Program Code

This document describes a program that calculates the areas of different shapes. It defines variables to store the length, radius, base, and height of shapes. Buttons are included to exit the program, clear the input fields, and calculate the area of a square, circle, and triangle based on the inputs. The calculated areas are then displayed on labels with two decimal places of precision.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

CALCULO DE AREAS

Public Class FrmArea


Dim L, R, B, H, A_Cuadr, A_Cir, A_Trian As Single
Private Sub BtnSalir_Click(sender As Object, e As EventArgs) Handles [Link]
End
End Sub

Private Sub BtnLimpiar_Click(sender As Object, e As EventArgs) Handles [Link]


[Link] = ""
[Link] = ""
[Link] = ""
[Link] = ""
LblA_Cuadr.Text = ""
LblA_Cir.Text = ""
LblA_Trian.Text = ""
End Sub

Private Sub BtnCalcular_Click(sender As Object, e As EventArgs) Handles [Link]


L = Val([Link])
R = Val([Link])
B = Val([Link])
H = Val([Link])
A_Cuadr = L * L
A_Cir = ([Link] * [Link](R, 2))
A_Trian = (B * H) / 2
LblA_Cuadr.Text = [Link](A_Cuadr, 2)
LblA_Cir.Text = [Link](A_Cir, 2)
LblA_Trian.Text = [Link](A_Trian, 2)
End Sub
End Class

You might also like