You are on page 1of 6

Universidad Tecnológica de Panamá

Facultad de Ingeniería Civil

Programación

Tarea Nº6

Tema:

Vigas

Nombre:

Dayana Castrejón

Cédula:

8-922-714

Grupo:

1IC124

Profesor:

Emilio Batista

Fecha:

Junio 25,2017
Tarea Nº6

Vigas

1. Diseño del Formulario

2. Códigos del Programa


Public Class Form1

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


Me.Text = "Reacciones de una Viga"
Label2.Text = Environ("COMPUTERNAME")
Label3.Text = Environ("USERNAME")
End Sub

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


Button1.Click
Dim P, W1, W2, L As Integer
Dim MA, RAy, RB As Single

L = Val(TextBox1.Text)
P = Val(TextBox2.Text)
W1 = Val(TextBox3.Text)
W2 = Val(TextBox4.Text)

If RadioButton1.Checked Then
If CheckBox1.Checked Then
RAy = P * (L / 2) * (1 / L)
RB = P * (L / 2) * (1 / L)
MA = RAy - RB
End If
End If

If RadioButton1.Checked Then
If CheckBox2.Checked Then
RAy = P
MA = P * (L / 2)
End If
End If

If RadioButton2.Checked Then
If CheckBox1.Checked Then
RAy = (W1 * L) * (L / 2) * (1 / L)
RB = (W1 * L) * (L / 2) * (1 / L)
MA = RAy - RB
End If
End If

If RadioButton2.Checked Then
If CheckBox2.Checked Then
RAy = W1 * L
MA = (W1 * L) * (L / 2)
End If
End If

If RadioButton3.Checked Then
If CheckBox1.Checked Then
RAy = ((W2 * L) / 2) * (L / 2) * (1 / L)
RB = ((W2 * L) / 2) * (L / 2) * (1 / L)
MA = RAy - RB
End If
End If

If RadioButton3.Checked Then
If CheckBox2.Checked Then
RAy = (W2 * L) / 2
MA = ((W2 * L) / 2) * (L / 2)
End If
End If

TextBox5.Text = MA
TextBox6.Text = RAy
TextBox7.Text = RB
End Sub

Private Sub Button2_Click(sender As Object, e As EventArgs) Handles


Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
CheckBox1.Checked = False
CheckBox2.Checked = False
RadioButton1.Checked = False
RadioButton2.Checked = False
RadioButton3.Checked = False
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles
Button3.Click
Me.Close()
End Sub

End Class

3. Programa Ejecutado

You might also like