You are on page 1of 3

VISUAL STUDIO

Herramientas
Label, Button, Checkbox, Radio Button, Text Box, Group Box, DataGridView.

CALCULO DE AREA

Public Class Form1


Dim A, B, C As Single

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


A = Val(TextBox1.Text)
B = Val(TextBox2.Text)
C = A * B
TextBox3.Text = C

End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
End
End Sub
End Class
CALCULO DEL NUMERO DE REYNOLDS

Public Class Form1


Dim S, DEN, VP, PC, VEL, NRE As Single

Dim FLUJ As String

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


Dim ID, OH, OD As Single
If CheckBox1.Checked Then
ID = InputBox("pulg2", "DIAMETRO INTERNO CÑ")
S = ID
ElseIf CheckBox2.Checked Then
OH = InputBox("pulg2", "DIAMETRO DEL AGUJERO")
OD = InputBox("pulg2", "DIAMETRO EXTERNO CÑ")
S = OH - OD
End If
DEN = Val(TextBox1.Text)
VP = Val(TextBox2.Text)
PC = Val(TextBox3.Text)
VEL = Val(TextBox4.Text)
NRE = (928 * DEN * VEL * S) / (VP + 6.65 * (S / VEL) * PC)
TextBox5.Text = NRE
If (NRE < 100) Then
FLUJ = "FLUJO TAPON"
ElseIf (NRE < 2100) Then
FLUJ = "FLUJO LAMINAR"
ElseIf (NRE < 4000) Then
FLUJ = "FLUJO DE TRANSICION"
Else
FLUJ = "FLUJO TURBULENTO"
End If
Label10.Text = FLUJ

End Sub

Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click


TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""

End Sub

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click


End
End Sub
End Class

You might also like