0% found this document useful (0 votes)
18 views62 pages

CÓDIGOS

The document contains 12 programs written in Visual Basic Studio. Each program contains code to solve a different numeric or logical problem by declaring and assigning variables, using conditional statements, and displaying outputs. The programs are written by a student named Hector Isael Garcia Francisco for their Methods course.

Uploaded by

Isael Garcia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views62 pages

CÓDIGOS

The document contains 12 programs written in Visual Basic Studio. Each program contains code to solve a different numeric or logical problem by declaring and assigning variables, using conditional statements, and displaying outputs. The programs are written by a student named Hector Isael Garcia Francisco for their Methods course.

Uploaded by

Isael Garcia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 62

UNIVERSIDAD PARA EL BIENESTAR

BENITO JUAREZ GARCIA

PERIODO PERIODO
ESCOLAR ESCOLAR
2023-01 2023-01

DOCENTE: ING. BRENDA BERENICE HERNANDEZ GUERRERO

ALUMNO: HECTOR ISAEL GARCIA FRANCISCO

CARRERA: LIC. EN INGENIERÍA EN PROCESOS PETROLEROS

MATERIA: MÉTODOS NUMÉRICOS Y PROGRAMACIÓN

FOLIO: AES211044888

SEMESTRE: 4 GRUPO: B

VISUAL BASIC STUDIO P á g i n a 1 | 62


PROGRAMA 1
VARIABLES ENTEROS

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim A As Integer 'Declaracion de variables


Dim B As Integer

A = TextBox1.Text 'Asiganacion de variables


B = TextBox2.Text

TextBox3.Text = ((A + B) ^ 2 / 3) 'Formula o procedimiento

End Sub

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


Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 2 | 62


PROGRAMA 2
BASE Y ALTURA

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim base As Integer 'Declaracion de variables


Dim altura As Integer

base = TextBox1.Text 'Asignacion de variables


altura = TextBox2.Text

TextBox3.Text = base * altura 'Operaciones


TextBox4.Text = (2 * base) + (2 * altura)

End Sub

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


Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
End Sub

VISUAL BASIC STUDIO P á g i n a 3 | 62


PROGRAMA 3
HIPOTENUSA DE UN TRIANGULO RECTANGULO

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim A As Integer 'Declaracion de variables


Dim B As Integer

A = TextBox1.Text 'Asignacion de variables


B = TextBox2.Text

Label4.Text = ((A) ^ 2 + (B) ^ 2) ^ 0.5 'Formula o procedimiento

End Sub

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


Button2.Click

TextBox1.Text = ""
TextBox2.Text = ""
Label4.Text = ""

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 4 | 62


PROGRAMA 4
NÚMERO DE DÍAS

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim dias As Integer 'Declaracion de variables

dias = TextBox1.Text 'Asignacion de variables

Label3.Text = dias 'Formula o procedimiento


Label5.Text = dias * 86400

End Sub

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


Button2.Click

TextBox1.Text = ""
Label3.Text = ""
Label5.Text = ""

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 5 | 62


PROGRAMA 5
CALIFICACIÓN DE UN ALUMNO

Public Class Form1


Private Sub Promedio_Click(sender As Object, e As EventArgs) Handles
Promedio.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Calif As Integer 'Declaracion de variables

Calif = Calificacion.Text 'Asignacion de variables

If Calif >= 7 Then


Mensaje.Text = "Aprobado"
End If

End Sub

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


Limpiar.Click

Calificacion.Text = ""
Mensaje.Text = ""

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 6 | 62


PROGRAMA 6
EDAD

Public Class Form1


Private Sub Promedio_Click(sender As Object, e As EventArgs) Handles
Promedio.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Edad As Integer 'Declaracion de variable


Edad = Edad1.Text 'Asignacion de variable

If Edad >= 18 Then


Mensaje.Text = "Adulto"
End If

End Sub

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


Limpiar.Click

Edad1.Text = ""
Mensaje.Text = ""

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 7 | 62


PROGRAMA 7
SUELDO DE UN TRABAJADOR

Public Class Form1


Private Sub Aumento_Click(sender As Object, e As EventArgs) Handles
Aumento.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Salario As Double 'Declaracion de variables


Dim Salnuevo As Double

Salario = Sueldo.Text 'Asignacion de variable

If Salario < 1000 Then


Salnuevo = Salario * 1.15
NewSueldo.Text = Salnuevo
End If

End Sub

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


Limpiar.Click

Sueldo.Text = ""
NewSueldo.Text = ""

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 8 | 62


PROGRAMA 8
SALARIO DE UN EMPLEADO

Public Class Form1


Private Sub Aumento_Click(sender As Object, e As EventArgs) Handles
Aumento.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Salario As Double 'Declaracion de variable


Dim Salnuevo As Double
Dim Venta As Double

Salario = Sueldo.Text
Venta = Venta1.Text

If Venta >= 15000 Then


Salnuevo = Salario * 2
Newsueldo.Text = Salnuevo
End If

End Sub

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


Limpiar.Click
Sueldo.Text = ""
Venta1.Text = ""
Newsueldo.Text = ""
End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 9 | 62


PROGRAMA 9
NOMBRE Y VENTA DE UN TRABAJADOR

Public Class Form1


Private Sub Comision_Click(sender As Object, e As EventArgs) Handles
Comision.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Nombre As String


Dim Venta As Double
Dim Comision As Double

Nombre = NOMTRABAJADOR.Text
Venta = Aumento.Text

If Venta > 10000 Then


Venta = Venta * 0.05
Mensaje.Visible = True
Mensaje.Text = " Felicidades " & Nombre & " Tu comision es de $
" & Venta
End If

End Sub

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


Limpiar.Click

NOMTRABAJADOR.Text = ""
Aumento.Text = ""
Mensaje.Text = ""

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 10 | 62


PROGRAMA 1O
DESCUENTO

Public Class Form1


Private Sub Descuento_Click(sender As Object, e As EventArgs) Handles
Descuento.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Pago As Double


Dim Num As Integer
Dim Descue As Double

Pago = Compra.Text
Num = Numero.Text

If Num < 30 Then


Descue = Pago * 0.15
Desc.Visible = True
Desc.Text = " Felicidades te ganaste un descuento de $ " &
Descue
Else
Descue = Pago * 0.2
Desc.Visible = True
Desc.Text = " Felicidades te ganaste un descuento de $ " &
Descue
End If

End Sub

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


Limpiar.Click

Compra.Text = ""
Numero.Text = ""
Desc.Text = ""

End Sub
End Class
VISUAL BASIC STUDIO P á g i n a 11 | 62
PROGRAMA 11
FIANZA

Public Class Form1


Private Sub Descuento_Click(sender As Object, e As EventArgs) Handles
Descuento.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim fianz As Integer


Dim descu As Double

fianz = Fianza.Text

If fianz < 50000 Then


descu = fianz * 0.03
Desc.Visible = True
Desc.Text = " Tu descuento sera :" & descu
Else
descu = fianz * 0.02
Desc.Visible = True
Desc.Text = " Tu descuento sera :" & descu
End If

End Sub

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


Limpiar.Click
Fianza.Text = ""
Desc.Text = ""
End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 12 | 62


PROGRAMA 12
COLEGIATURAS

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Materias As Integer


Dim Precio As Double
Dim Promedio As Integer
Dim Cole As Double
Dim Descue As Double

Materias = ComboBox1.Text
Precio = TextBox1.Text
Promedio = TextBox2.Text

If Promedio >= 9 Then


Cole = Materias * Precio
Descue = Cole * 0.7
TextBox3.Text = Descue
Else
Cole = Materias * Precio
Descue = Cole * 1.1
TextBox3.Text = Descue
End If

End Sub

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


Button2.Click

ComboBox1.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""

End Sub
End Class
VISUAL BASIC STUDIO P á g i n a 13 | 62
PROGRAMA 13
INGRESOS/ENGANCHE

Public Class Form1


Private Sub Operacion_Click(sender As Object, e As EventArgs) Handles
Operacion.Click
'Nombre del Alumno: Hector Isael Garcia Francisco

Dim Ingreso As Double


Dim Casa As Double

Ingreso = TextBox1.Text
Casa = TextBox2.Text

If Ingreso < 8000 Then


TextBox3.Text = TextBox2.Text * 0.15
TextBox4.Text = (TextBox2.Text * 0.85) / 120
Else
TextBox3.Text = TextBox2.Text * 0.3
TextBox4.Text = (TextBox2.Text * 0.7) / 84
End If

End Sub

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


Limpiar.Click

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

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 14 | 62


PROGRAMA 14
ASCENDENTE

Public Class Form1


Private Sub Mayor_Click(sender As Object, e As EventArgs) Handles
Mayor.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Num1, Num2, Num3 As Integer

Num1 = TextBox1.Text
Num2 = TextBox2.Text
Num3 = TextBox3.Text

If Num1 > Num2 Then


If Num1 > Num3 Then
MsgBox(" El numero mayor es : " & Num1)
Else
MsgBox(" El numero mayor es : " & Num3)
End If
Else
If Num2 > Num3 Then
MsgBox(" El numero mayor es : " & Num2)
Else
MsgBox(" El numero mayor es : " & Num3)
End If
End If

End Sub

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


Button2.Click

TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 15 | 62


PROGRAMA 15
DESCENDENTE/ ASCENDENTE

Public Class Form1


Private Sub Mayor_Click(sender As Object, e As EventArgs) Handles Mayor.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Num10, Num20, Num30 As Integer

Num10 = TextBox1.Text
Num20 = TextBox2.Text
Num30 = TextBox3.Text

If Num10 > Num20 Then


If Num10 > Num30 Then
If Num20 > Num30 Then
MsgBox(" El orden descendente es " & Num30 & " " & Num20 & " " &
Num10)
Else
MsgBox(" El orden descendente es " & Num20 & " " & Num30 & " " &
Num10)
End If
Else
MsgBox(" El orden descendente es " & Num20 & " " & Num10 & " " & Num30)
End If
Else
If Num20 > Num30 Then
If Num10 > Num30 Then
MsgBox(" El orden descendente es " & Num30 & " " & Num10 & " " &
Num20)
Else
MsgBox(" El orden descendente es " & Num10 & " " & Num30 & " " &
Num20)
End If
Else
MsgBox(" El orden descendente es " & Num10 & " " & Num20 & " " & Num30)
End If
End If
End Sub

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

TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 16 | 62


PROGRAMA 16
ASCENDENTE/DESCENDENTE

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Num1, Num2, Num3 As Integer


Dim Ascendente As String

Num1 = TextBox1.Text
Num2 = TextBox2.Text
Num3 = TextBox3.Text
Ascendente = ComboBox1.Text

If Num1 > Num2 Then


If Num2 > Num3 Then
If Ascendente = "Ascendente" Then
MsgBox("El orden Ascendente es:" & Num3 & " " & Num2 & "
" & Num1)
Else
MsgBox("El orden Descendente es:" & Num1 & " " & Num2 &
" " & Num3)
End If
Else
If Num1 > Num3 Then
If Ascendente = "Ascendente" Then
MsgBox("El orden Ascendente es:" & Num2 & " " & Num3
& " " & Num1)
Else
MsgBox("El orden Descendente es:" & Num1 & " " &
Num3 & " " & Num2)
End If
Else
If Ascendente = "Ascendente" Then
MsgBox("El orden Ascendente es:" & Num2 & " " & Num1
& " " & Num3)
Else

VISUAL BASIC STUDIO P á g i n a 17 | 62


MsgBox("El orden Descendente es:" & Num3 & " " &
Num1 & " " & Num2)
End If
End If
End If
Else
If Num3 > Num1 Then
If Num2 > Num3 Then
If Ascendente = "Ascendente" Then
MsgBox("El orden Ascendente es:" & Num1 & " " & Num3
& " " & Num2)
Else
MsgBox("El orden Descendente es:" & Num2 & " " &
Num3 & " " & Num1)
End If
Else
If Ascendente = "Ascendente" Then
MsgBox("El orden Ascendente es:" & Num1 & " " & Num2
& " " & Num3)
Else
MsgBox("El orden Descendente es:" & Num3 & " " &
Num2 & " " & Num1)
End If
End If
Else
If Num2 = Num3 Then
MsgBox("Todos los numeros son iguales")
Else
If Ascendente = "Ascendente" Then
MsgBox("El orden Ascendente es:" & Num3 & " " & Num1
& " " & Num2)
Else
MsgBox("El orden Descendente es:" & Num2 & " " &
Num1 & " " & Num3)
End If
End If
End If
End If

End Sub

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


Button2.Click

TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
ComboBox1.Text = ""
End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 18 | 62


PROGRAMA 17
DIAS QUE TRABAJA UN EMPLEADO

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Pago.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Dias As String


Dim Horas As Double
Dim Sueldo As String

Dias = ComboBox1.Text
Horas = Jornada.Text
Sueldo = Salario.Text

If Dias = "Lunes" Then


Sueldo = Jornada.Text * 100
Salario.Visible = True
Salario.Text = Sueldo
Label3.Visible = True
Else
If Dias = "Martes" Then
Sueldo = Jornada.Text * 120
Salario.Visible = True
Salario.Text = Sueldo
Label3.Visible = True
Else
If Dias = "Miercoles" Then
Sueldo = Jornada.Text * 110
Salario.Visible = True
Salario.Text = Sueldo
Label3.Visible = True
Else
If Dias = "Jueves" Then

VISUAL BASIC STUDIO P á g i n a 19 | 62


Sueldo = Jornada.Text * 140
Salario.Visible = True
Salario.Text = Sueldo
Label3.Visible = True
Else
If Dias = "Viernes" Then
Sueldo = Jornada.Text * 150
Salario.Visible = True
Salario.Text = Sueldo
Label3.Visible = True
Else
If Dias = "Sabado" Then
Sueldo = Jornada.Text * 200
Salario.Visible = True
Salario.Text = Sueldo
Label3.Visible = True
Else
If Dias = "Domingo" Then
Sueldo = Jornada.Text * 250
If Sueldo = 0 Then
MsgBox("No trabajo")
Else
Salario.Visible = True
Salario.Text = Sueldo
Label3.Visible = True
End If
End If
End If
End If
End If
End If
End If
End If

End Sub

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


Limpiar.Click

ComboBox1.Text = ""
Jornada.Text = ""
Salario.Text = ""
Label3.Visible = False
Salario.Visible = False

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 20 | 62


PROGRAMA 18
CATEGORIA

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Cat As Integer


Dim Sueldo As Double

Cat = Categoria.Text
Sueldo = Salario.Text

Select Case Cat


Case 1
TextBox2.Visible = True
Label3.Visible = True
TextBox2.Text = Sueldo + (Sueldo * 0.15)

Case 2
TextBox2.Visible = True
Label3.Visible = True
TextBox2.Text = Sueldo + (Sueldo * 0.1)

Case 3
TextBox2.Visible = True
Label3.Visible = True
TextBox2.Text = Sueldo + (Sueldo * 0.08)

Case 4
TextBox2.Visible = True
Label3.Visible = True
TextBox2.Text = Sueldo + (Sueldo * 0.07)

VISUAL BASIC STUDIO P á g i n a 21 | 62


Case Else
MsgBox("Sin aumento")
End Select
End Sub

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


Button2.Click

Categoria.Text = ""
Salario.Text = ""
TextBox2.Visible = False
Label3.Visible = False
TextBox2.Text = ""

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 22 | 62


PROGRAMA 19
DESCUENTO (CASE)

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Cant As Double


Dim Precio As Double
Dim Compra As String

Cant = TextBox1.Text
Precio = TextBox2.Text
Compra = TextBox3.Text

Select Case Precio


Case < 500
TextBox3.Text = Cant * Precio
MsgBox("No hay descuento")

Case < 1000


TextBox3.Text = Cant * Precio
MsgBox(" Total a pagar es : " & Cant * Precio * 0.95)

Case < 7000


TextBox3.Text = Cant * Precio
MsgBox(" Total a pagar es : " & Cant * Precio * 0.9)

Case < 15000


TextBox3.Text = Cant * Precio
MsgBox(" Total a pagar es : " & Cant * Precio * 0.85)

VISUAL BASIC STUDIO P á g i n a 23 | 62


Case Else
TextBox3.Text = Cant * Precio
MsgBox(" Total a pagar es : " & Cant * Precio * 0.75)
End Select
End Sub

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


Button2.Click

TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 24 | 62


PROGRAMA 20
NULO - POSITIVO - NEGATIVO

Public Class Form1


Private Sub Button1_Click(sender As Object, e As EventArgs) Handles
Button1.Click
'Nombre del alumno: Hector Isael Garcia Francisco

Dim Num As String

Num = TextBox1.Text

Select Case Num


Case = 0
MsgBox("El numero es nulo")

Case > 0
MsgBox("El numero es positivo")

Case Else
MsgBox("El numero es negativo")
End Select
End Sub

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


Button2.Click

TextBox1.Text = ""

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 25 | 62


PROGRAMA 21
COLORES

Public Class Form1


Private Sub Colorin_KeyDown(sender As Object, e As KeyEventArgs) Handles
Colorin.KeyDown
'Nombre del alumno: Hector Isael Garcia Francisco

If e.KeyCode = Keys.R Then


Colorin.BackColor = Color.Red
End If

If e.KeyCode = Keys.V Then


Colorin.BackColor = Color.Violet
End If

If e.KeyCode = Keys.W Then


Colorin.BackColor = Color.White
End If

If e.KeyCode = Keys.G Then


Colorin.BackColor = Color.Gainsboro
End If

If e.KeyCode = Keys.U Then


Colorin.BackColor = Color.Aqua
End If

If e.KeyCode = Keys.T Then


Colorin.BackColor = Color.Teal
End If

If e.KeyCode = Keys.I Then


Colorin.BackColor = Color.Indigo
End If
VISUAL BASIC STUDIO P á g i n a 26 | 62
If e.KeyCode = Keys.O Then
Colorin.BackColor = Color.Olive
End If

If e.KeyCode = Keys.Z Then


Colorin.BackColor = Color.Khaki
End If

If e.KeyCode = Keys.N Then


Colorin.BackColor = Color.Navy
End If
End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 27 | 62


PROGRAMA 22
TABLA DE MULTIPLICAR

Public Class Form1


Private Sub Form1_Load(sender As Object, e As EventArgs) Handles
MyBase.Load
'Nombre del alumno: Hector Isael Garcia Francisco

Dim i
Dim Multi As Integer

Multi = Val(InputBox("¿Que tabla de multiplicacion deseas?" & vbCrLf


&
"Introduce un numero", "Tabla de
multiplicacion"))

Tabla.Font = New Font("Arial", 14, FontStyle.Bold)


Tabla.ForeColor = Color.Red
Tabla.TextAlign = ContentAlignment.MiddleCenter
Tabla.Text = ""

For i = 1 To 10 Step 1
Tabla.Text = Tabla.Text & Multi & " * " & i & " = " & Multi * i
& vbCrLf
Next i

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 28 | 62


PROGRAMA 23
CONVERTIDOR DE UNIDADES

Imports System.Windows.Forms.VisualStyles.VisualStyleElement.Button

Public Class Form1


Private Sub RadioButton1_CheckedChanged(sender As Object, e As
EventArgs) Handles Lon.CheckedChanged

If Lon.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
ComboBox1.Items.Add("m")
ComboBox1.Items.Add("in")
ComboBox1.Items.Add("ft")
ComboBox1.Items.Add("milla")
ComboBox1.Items.Add("milla nautica")
ComboBox1.Items.Add("fermis")
ComboBox1.Items.Add("angstrom")
ComboBox1.Items.Add("miles")
ComboBox1.Items.Add("rod")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("m")
ComboBox2.Items.Add("in")
ComboBox2.Items.Add("ft")
ComboBox2.Items.Add("milla")
ComboBox2.Items.Add("milla nautica")
ComboBox2.Items.Add("fermis")
ComboBox2.Items.Add("angstrom")
ComboBox2.Items.Add("miles")
ComboBox2.Items.Add("rod")

Else

ComboBox1.Items.Clear()
VISUAL BASIC STUDIO P á g i n a 29 | 62
ComboBox2.Items.Clear()

End If

End Sub

Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs)


Handles Are.CheckedChanged

If Are.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
ComboBox1.Items.Add("m^2")
ComboBox1.Items.Add("hectarea")
ComboBox1.Items.Add("ft^2")
ComboBox1.Items.Add("in^2")
ComboBox1.Items.Add("acre")
ComboBox1.Items.Add("cm^2")
ComboBox1.Items.Add("circular miles")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("m^2")
ComboBox2.Items.Add("hectarea")
ComboBox2.Items.Add("ft^2")
ComboBox2.Items.Add("in^2")
ComboBox2.Items.Add("acre")
ComboBox2.Items.Add("cm^2")
ComboBox2.Items.Add("circular miles")
Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If
End Sub

Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs)


Handles Vol.CheckedChanged

If Vol.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
ComboBox1.Items.Add("m^3")
ComboBox1.Items.Add("ft^3")
ComboBox1.Items.Add("in^3")
ComboBox1.Items.Add("galon")
ComboBox1.Items.Add("litro")
ComboBox1.Items.Add("cm^3")
ComboBox1.Items.Add("mm^3")

ComboBox2.Items.Clear()
VISUAL BASIC STUDIO P á g i n a 30 | 62
ComboBox2.Items.Add("m^3")
ComboBox2.Items.Add("ft^3")
ComboBox2.Items.Add("in^3")
ComboBox2.Items.Add("galon")
ComboBox2.Items.Add("litro")
ComboBox2.Items.Add("cm^3")
ComboBox2.Items.Add("mm^3")
Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If

End Sub

Private Sub RadioButton4_CheckedChanged(sender As Object, e As EventArgs)


Handles Tiem.CheckedChanged

If Tiem.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
ComboBox1.Items.Add("año")
ComboBox1.Items.Add("dia sideral")
ComboBox1.Items.Add("dias")
ComboBox1.Items.Add("horas")
ComboBox1.Items.Add("minutos")
ComboBox1.Items.Add("segundos")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("año")
ComboBox2.Items.Add("dia sideral")
ComboBox2.Items.Add("dias")
ComboBox2.Items.Add("horas")
ComboBox2.Items.Add("minutos")
ComboBox2.Items.Add("segundos")
Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If
End Sub

Private Sub RadioButton5_CheckedChanged(sender As Object, e As EventArgs)


Handles Frecu.CheckedChanged

If Frecu.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()

VISUAL BASIC STUDIO P á g i n a 31 | 62


ComboBox1.Items.Add("hertz")
ComboBox1.Items.Add("ciclo")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("hertz")
ComboBox2.Items.Add("ciclo")

Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If

End Sub

Private Sub RadioButton6_CheckedChanged(sender As Object, e As EventArgs)


Handles Velo.CheckedChanged

If Velo.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
ComboBox1.Items.Add("m/s")
ComboBox1.Items.Add("km/h")
ComboBox1.Items.Add("milla/hora")
ComboBox1.Items.Add("nudos")
ComboBox1.Items.Add("ft/s")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("m/s")
ComboBox2.Items.Add("km/h")
ComboBox2.Items.Add("milla/hora")
ComboBox2.Items.Add("nudos")
ComboBox2.Items.Add("ft/s")

Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If

End Sub

Private Sub RadioButton7_CheckedChanged(sender As Object, e As EventArgs)


Handles Mas.CheckedChanged

If Mas.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()

VISUAL BASIC STUDIO P á g i n a 32 | 62


ComboBox1.Items.Add("kg")
ComboBox1.Items.Add("lbm")
ComboBox1.Items.Add("slug")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("kg")
ComboBox2.Items.Add("lbm")
ComboBox2.Items.Add("slug")

Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If

End Sub

Private Sub RadioButton8_CheckedChanged(sender As Object, e As EventArgs)


Handles Dens.CheckedChanged

If Dens.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
ComboBox1.Items.Add("g/cm^3")
ComboBox1.Items.Add("kg/m^3")
ComboBox1.Items.Add("lbm/ft^3")
ComboBox1.Items.Add("slug/ft^3")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("g/cm^3")
ComboBox2.Items.Add("kg/m^3")
ComboBox2.Items.Add("lbm/ft^3")
ComboBox2.Items.Add("slug/ft^3")

Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If

End Sub

Private Sub RadioButton9_CheckedChanged(sender As Object, e As EventArgs)


Handles Fuer.CheckedChanged

If Fuer.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
VISUAL BASIC STUDIO P á g i n a 33 | 62
ComboBox1.Items.Add("newton")
ComboBox1.Items.Add("dinas")
ComboBox1.Items.Add("kg newton")
ComboBox1.Items.Add("lb")
ComboBox1.Items.Add("lbf")
ComboBox1.Items.Add("poundls")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("newton")
ComboBox2.Items.Add("dinas")
ComboBox2.Items.Add("kg newton")
ComboBox2.Items.Add("lb")
ComboBox2.Items.Add("lbf")
ComboBox2.Items.Add("poundls")
Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If

End Sub

Private Sub RadioButton10_CheckedChanged(sender As Object, e As EventArgs)


Handles Pres.CheckedChanged

If Pres.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
ComboBox1.Items.Add("N/m^2")
ComboBox1.Items.Add("atm")
ComboBox1.Items.Add("lb/in^2")
ComboBox1.Items.Add("lb/ft^2")
ComboBox1.Items.Add("cmHg")
ComboBox1.Items.Add("in de agua")
ComboBox1.Items.Add("bar")
ComboBox1.Items.Add("kg wt/m^2")
ComboBox1.Items.Add("torr")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("N/m^2")
ComboBox2.Items.Add("atm")
ComboBox2.Items.Add("lb/in^2")
ComboBox2.Items.Add("lb/ft^2")
ComboBox2.Items.Add("cmHg")
ComboBox2.Items.Add("in de agua")
ComboBox2.Items.Add("bar")
ComboBox2.Items.Add("kg wt/m^2")
ComboBox2.Items.Add("torr")

Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If

End Sub

VISUAL BASIC STUDIO P á g i n a 34 | 62


Private Sub RadioButton11_CheckedChanged(sender As Object, e As EventArgs)
Handles Trabaj.CheckedChanged

If Trabaj.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
ComboBox1.Items.Add("joule")
ComboBox1.Items.Add("cal")
ComboBox1.Items.Add("btu")
ComboBox1.Items.Add("ft/lb")
ComboBox1.Items.Add("ergios")
ComboBox1.Items.Add("eV")
ComboBox1.Items.Add("kcal")
ComboBox1.Items.Add("MeV")
ComboBox1.Items.Add("kw/h")
ComboBox1.Items.Add("hp/h")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("joule")
ComboBox2.Items.Add("cal")
ComboBox2.Items.Add("btu")
ComboBox2.Items.Add("ft/lb")
ComboBox2.Items.Add("ergios")
ComboBox2.Items.Add("eV")
ComboBox2.Items.Add("kcal")
ComboBox2.Items.Add("MeV")
ComboBox2.Items.Add("k/h")
ComboBox2.Items.Add("hp/h")

Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If

End Sub

Private Sub RadioButton12_CheckedChanged(sender As Object, e As EventArgs)


Handles Poten.CheckedChanged

If Poten.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
ComboBox1.Items.Add("hp")
ComboBox1.Items.Add("btu/h")
ComboBox1.Items.Add("ft*lb/s")
ComboBox1.Items.Add("watts")
ComboBox1.Items.Add("kcal/s")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("hp")
VISUAL BASIC STUDIO P á g i n a 35 | 62
ComboBox2.Items.Add("btu/h")
ComboBox2.Items.Add("ft*lb/s")
ComboBox2.Items.Add("watts")
ComboBox2.Items.Add("kcal/s")

Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If

End Sub

Private Sub RadioButton13_CheckedChanged(sender As Object, e As EventArgs)


Handles Carg.CheckedChanged

If Carg.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
ComboBox1.Items.Add("faraday")
ComboBox1.Items.Add("coulombs")
ComboBox1.Items.Add("carga electron")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("faraday")
ComboBox2.Items.Add("coulombs")
ComboBox2.Items.Add("carga electron")

Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If

End Sub

Private Sub RadioButton14_CheckedChanged(sender As Object, e As EventArgs)


Handles Fluj.CheckedChanged

If Fluj.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
ComboBox1.Items.Add("weber")
ComboBox1.Items.Add("maxwells")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("weber")
ComboBox2.Items.Add("maxwells")

VISUAL BASIC STUDIO P á g i n a 36 | 62


Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If

End Sub

Private Sub RadioButton15_CheckedChanged(sender As Object, e As EventArgs)


Handles Inten.CheckedChanged

If Inten.Checked = True Then


ComboBox1.Focus()

ComboBox1.Items.Clear()
ComboBox1.Items.Add("tesla")
ComboBox1.Items.Add("newton/amp*m")
ComboBox1.Items.Add("weber/m^2")
ComboBox1.Items.Add("gauss")

ComboBox2.Items.Clear()
ComboBox2.Items.Add("tesla")
ComboBox2.Items.Add("newton/amp * m")
ComboBox2.Items.Add("weber/m^2")
ComboBox2.Items.Add("gauss")

Else

ComboBox1.Items.Clear()
ComboBox2.Items.Clear()

End If

End Sub

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


Button1.Click

Dim Valor As String


Dim Resultado As String
Dim De As String
Dim A As String
Dim GroupBox1 As String

Valor = TextBox1.Text
Resultado = TextBox2.Text
De = ComboBox1.Text
A = ComboBox2.Text
GroupBox1 = Lon.Text

VISUAL BASIC STUDIO P á g i n a 37 | 62


LONGITUD
If Lon.Text = "LONGITUD" Then
If ComboBox1.Text = "m" And ComboBox2.Text = "m" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " m "
Else
If ComboBox1.Text = "m" And ComboBox2.Text = "in" Then
TextBox2.Text = Val(TextBox1.Text) * 39.37 & " in "
Else
If ComboBox1.Text = "in" And ComboBox2.Text = "m" Then
TextBox2.Text = Val(TextBox1.Text) / 39.37 & " m "
Else
If ComboBox1.Text = "m" And ComboBox2.Text = "ft" Then
TextBox2.Text = Val(TextBox1.Text) * 3.281 & " ft "
Else
If ComboBox1.Text = "ft" And ComboBox2.Text = "m" Then
TextBox2.Text = Val(TextBox1.Text) / 3.281 & " m "
Else
If ComboBox1.Text = "m" And ComboBox2.Text = "milla" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000612 & " milla "
Else
If ComboBox1.Text = "milla" And ComboBox2.Text = "m" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000612 & " m "
Else
If ComboBox1.Text = "m" And ComboBox2.Text = "milla nautica" Then
TextBox2.Text = Val(TextBox1.Text) * 1852 & " milla nautica "
Else
If ComboBox1.Text = "milla nautica" And ComboBox2.Text = "m" Then
TextBox2.Text = Val(TextBox1.Text) / 1852 & " m "
Else
If ComboBox1.Text = "m" And ComboBox2.Text = "angstrom" Then
TextBox2.Text = Val(TextBox1.Text) * 10 ^ 10 & " angstrom "
Else
If ComboBox1.Text = "angtrom" And ComboBox2.Text = "m" Then
TextBox2.Text = Val(TextBox1.Text) / 10 ^ 10 & " m "
Else
If ComboBox1.Text = "m" And ComboBox2.Text = "miles" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0000254 & " miles "
Else
If ComboBox1.Text = "miles" And ComboBox2.Text = "m" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0000254 & " m "
Else
If ComboBox1.Text = "m" And ComboBox2.Text = "rod" Then
TextBox2.Text = Val(TextBox1.Text) * 5.0289 & " rod
"
Else
If ComboBox1.Text = "rod" And ComboBox2.Text = "m"
Then
TextBox2.Text = Val(TextBox1.Text) / 5.0289 & "
m "
Else
If ComboBox1.Text = "m" And ComboBox2.Text =
"fermis" Then
TextBox2.Text = Val(TextBox1.Text) * 10 ^ 15
& " fermis "
Else
If ComboBox1.Text = "fermis" And
ComboBox2.Text = "m" Then
TextBox2.Text = Val(TextBox1.Text) / 10
^ 15 & " m "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "in" And ComboBox2.Text = "in" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " in "
Else
If ComboBox1.Text = "in" And ComboBox2.Text = "ft" Then
TextBox2.Text = Val(TextBox1.Text) * 12 & " ft "
Else
If ComboBox1.Text = "ft" And ComboBox2.Text = "in" Then
TextBox2.Text = Val(TextBox1.Text) / 12 & " in "
Else
If ComboBox1.Text = "in" And ComboBox2.Text = "milla" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000015783 & " milla "
Else
If ComboBox1.Text = "milla" And ComboBox2.Text = "in" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000015783 & " in "
Else
If ComboBox1.Text = "in" And ComboBox2.Text = "milla nautica" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0000000000000013715 & " milla nautica "

VISUAL BASIC STUDIO P á g i n a 38 | 62


Else
If ComboBox1.Text = "milla nautica" And ComboBox2.Text = "in" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0000000000000013715 & " in "
Else
If ComboBox1.Text = "in" And ComboBox2.Text = "angstrom" Then
TextBox2.Text = Val(TextBox1.Text) * 254000000.0 & " angstrom "
Else
If ComboBox1.Text = "angstrom" And ComboBox2.Text = "in" Then
TextBox2.Text = Val(TextBox1.Text) / 254000000.0 & " in "
Else
If ComboBox1.Text = "in" And ComboBox2.Text = "miles" Then
TextBox2.Text = Val(TextBox1.Text) * 0.001 & " miles "
Else
If ComboBox1.Text = "miles" And ComboBox2.Text = "in" Then
TextBox2.Text = Val(TextBox1.Text) / 0.001 & " in "
Else
If ComboBox1.Text = "in" And ComboBox2.Text = "rod" Then
TextBox2.Text = Val(TextBox1.Text) * 0.00505051 & " rod "
Else
If ComboBox1.Text = "rod" And ComboBox2.Text = "in" Then
TextBox2.Text = Val(TextBox1.Text) / 0.00505051 & " in "
Else
If ComboBox1.Text = "in" And ComboBox2.Text = "fermis"
Then
TextBox2.Text = Val(TextBox1.Text) * 4.1049E-22 & "
fermis "
Else
If ComboBox1.Text = "fermis" And ComboBox2.Text =
"in" Then
TextBox2.Text = Val(TextBox1.Text) / 4.1049E-22
& " in "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "ft" And ComboBox2.Text = "ft" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " ft "
Else
If ComboBox1.Text = "ft" And ComboBox2.Text = "milla" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000189394 & " milla "
Else
If ComboBox1.Text = "milla" And ComboBox2.Text = "ft" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000189394 & " ft "
Else
If ComboBox1.Text = "ft" And ComboBox2.Text = "milla nautica" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000164579 & " milla nautica "
Else
If ComboBox1.Text = "milla nautica" And ComboBox2.Text = "ft" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000164579 & " ft "
Else
If ComboBox1.Text = "ft" And ComboBox2.Text = "angstrom" Then
TextBox2.Text = Val(TextBox1.Text) * 3048000000.0 & " angstrom "
Else
If ComboBox1.Text = "angstrom" And ComboBox2.Text = "ft" Then
TextBox2.Text = Val(TextBox1.Text) / 3048000000.0 & " ft "
Else
If ComboBox1.Text = "ft" And ComboBox2.Text = "miles" Then
TextBox2.Text = Val(TextBox1.Text) * 12000 & " miles "
Else
If ComboBox1.Text = "miles" And ComboBox2.Text = "ft" Then
TextBox2.Text = Val(TextBox1.Text) / 12000 & " ft "
Else
If ComboBox1.Text = "ft" And ComboBox2.Text = "rod" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0606 & " rod "
Else
If ComboBox1.Text = "rod" And ComboBox2.Text = "ft" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0606 & " ft "
Else
If ComboBox1.Text = "ft" And ComboBox2.Text = "fermis" Then
TextBox2.Text = Val(TextBox1.Text) * 4.9259E-21 & " fermis "
Else
If ComboBox1.Text = "fermis" And ComboBox2.Text = "ft" Then
TextBox2.Text = Val(TextBox1.Text) / 4.9259E-21 & " ft "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

VISUAL BASIC STUDIO P á g i n a 39 | 62


If ComboBox1.Text = "milla" And ComboBox2.Text = "milla" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " milla "
Else
If ComboBox1.Text = "milla" And ComboBox2.Text = "milla nautica" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0868976 & " milla nautica "
Else
If ComboBox1.Text = "milla nautica" And ComboBox2.Text = "milla" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0868976 & " milla "
Else
If ComboBox1.Text = "milla" And ComboBox2.Text = "angstrom" Then
TextBox2.Text = Val(TextBox1.Text) * 16090000000000.0 & " angstrom "
Else
If ComboBox1.Text = "angstrom" And ComboBox2.Text = "milla" Then
TextBox2.Text = Val(TextBox1.Text) / 16090000000000.0 & " milla"
Else
If ComboBox1.Text = "milla" And ComboBox2.Text = "miles" Then
TextBox2.Text = Val(TextBox1.Text) * 63360000 & " miles "
Else
If ComboBox1.Text = "miles" And ComboBox2.Text = "milla" Then
TextBox2.Text = Val(TextBox1.Text) / 63360000 & " milla "
Else
If ComboBox1.Text = "milla" And ComboBox2.Text = "rod" Then
TextBox2.Text = Val(TextBox1.Text) * 320 & " rod "
Else
If ComboBox1.Text = "rod" And ComboBox2.Text = "milla" Then
TextBox2.Text = Val(TextBox1.Text) / 320 & " milla "
Else
If ComboBox1.Text = "milla" And ComboBox2.Text = "fermis" Then
TextBox2.Text = Val(TextBox1.Text) * 2.688E-17 & " fermis "
Else
If ComboBox1.Text = "fermis" And ComboBox2.Text = "milla" Then
TextBox2.Text = Val(TextBox1.Text) / 2.688E-17 & " milla "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "milla nautica" And ComboBox2.Text = "milla nautica" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " milla nautica"
Else
If ComboBox1.Text = "milla nautica" And ComboBox2.Text = "angstrom" Then
TextBox2.Text = Val(TextBox1.Text) * 18520000000000.0 & " angstrom "
Else
If ComboBox1.Text = "angstrom" And ComboBox2.Text = "milla nautica" Then
TextBox2.Text = Val(TextBox1.Text) / 18520000000000.0 & " milla nautica"
Else
If ComboBox1.Text = "milla nautica" And ComboBox2.Text = "miles" Then
TextBox2.Text = Val(TextBox1.Text) * 72913380.0 & " miles "
Else
If ComboBox1.Text = "miles" And ComboBox2.Text = "milla nautica" Then
TextBox2.Text = Val(TextBox1.Text) / 72913380.0 & " milla nautica "
Else
If ComboBox1.Text = "milla nautica" And ComboBox2.Text = "rod" Then
TextBox2.Text = Val(TextBox1.Text) * 368.249 & " rod "
Else
If ComboBox1.Text = "rod" And ComboBox2.Text = "milla nautica " Then
TextBox2.Text = Val(TextBox1.Text) / 368.249 & " milla nautica "
Else
If ComboBox1.Text = "milla nautica" And ComboBox2.Text = "fermis" Then
TextBox2.Text = Val(TextBox1.Text) * 2.99303E-17 & " fermis "
Else
If ComboBox1.Text = "fermis" And ComboBox2.Text = "milla nautica" Then
TextBox2.Text = Val(TextBox1.Text) / 2.99303E-17 & " milla nautica"
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "angstrom" And ComboBox2.Text = "angstrom" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " angstrom"
Else
If ComboBox1.Text = "angstrom" And ComboBox2.Text = "miles" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000003937 & " miles "
Else
If ComboBox1.Text = "miles" And ComboBox2.Text = "angstrom" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000003937 & " angstrom "
Else
If ComboBox1.Text = "angstrom" And ComboBox2.Text = "rod" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0000000000198839 & " rod "
Else
If ComboBox1.Text = "rod" And ComboBox2.Text = "angstrom" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0000000000198839 & " angstrom "
Else
If ComboBox1.Text = "angstrom" And ComboBox2.Text = "fermis" Then
TextBox2.Text = Val(TextBox1.Text) * 1.61611E-30 & " fermis "
Else
If ComboBox1.Text = "fermis" And ComboBox2.Text = "angstrom" Then

VISUAL BASIC STUDIO P á g i n a 40 | 62


TextBox2.Text = Val(TextBox1.Text) / 1.61611E-30 & " angstrom "
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "miles" And ComboBox2.Text = "miles" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " miles"
Else
If ComboBox1.Text = "miles" And ComboBox2.Text = "rod" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000005051 & " rod "
Else
If ComboBox1.Text = "rod" And ComboBox2.Text = "miles" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000005051 & " miles "
Else
If ComboBox1.Text = "miles" And ComboBox2.Text = "fermis" Then
TextBox2.Text = Val(TextBox1.Text) * 25400000000.1016 & " fermis "
Else
If ComboBox1.Text = "fermis" And ComboBox2.Text = "miles" Then
TextBox2.Text = Val(TextBox1.Text) / 25400000000.1016 & " miles "
End If
End If
End If
End If

If ComboBox1.Text = "rod" And ComboBox2.Text = "rod" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " rod "
Else
If ComboBox1.Text = "rod" And ComboBox2.Text = "fermis" Then
TextBox2.Text = Val(TextBox1.Text) * 5.0292E+15 & " fermis "
Else
If ComboBox1.Text = "fermis" And ComboBox2.Text = "rod" Then
TextBox2.Text = Val(TextBox1.Text) / 5.0292E+15 & " rod "
End If
End If
End If

If ComboBox1.Text = "fermis" And ComboBox2.Text = "fermis" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " fermis "
End If
End If
End If

ÁREA
If Are.Text = "AREA" Then
If ComboBox1.Text = "m^2" And ComboBox2.Text = "m^2" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " m^2 "
Else
If ComboBox1.Text = "m^2" And ComboBox2.Text = "hectarea" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0001 & " hectarea "
Else
If ComboBox1.Text = "hectarea" And ComboBox2.Text = "m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0001 & " m^2 "
Else
If ComboBox1.Text = "m^2" And ComboBox2.Text = "ft^2" Then
TextBox2.Text = Val(TextBox1.Text) * 10.7639 & " ft^2 "
Else
If ComboBox1.Text = "ft^2" And ComboBox2.Text = "m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 10.7639 & " m^2 "
Else
If ComboBox1.Text = "m^2" And ComboBox2.Text = "in^2" Then
TextBox2.Text = Val(TextBox1.Text) * 1550 & " in^2 "
Else
If ComboBox1.Text = "in^2" And ComboBox2.Text = "m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 1550 & " m^2 "
Else
If ComboBox1.Text = "m^2" And ComboBox2.Text = "acre" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000247105 & " acre "
Else
If ComboBox1.Text = "acre" And ComboBox2.Text = "m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000247105 & " m^2 "
Else
If ComboBox1.Text = "m^2" And ComboBox2.Text = "cm^2" Then
TextBox2.Text = Val(TextBox1.Text) * 10000 & " cm^2 "
Else
If ComboBox1.Text = "cm^2" And ComboBox2.Text = "m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 10000 & " m^2 "
Else
If ComboBox1.Text = "m^2" And ComboBox2.Text = "circular miles"
Then
TextBox2.Text = Val(TextBox1.Text) * 1973525000.0 & "
circular miles "
Else
If ComboBox1.Text = "circular miles" And ComboBox2.Text =
"m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 1973525000.0 & "
m^2 "
End If

VISUAL BASIC STUDIO P á g i n a 41 | 62


End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "hectarea" And ComboBox2.Text = "hectarea" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " hectarea "
Else
If ComboBox1.Text = "hectarea" And ComboBox2.Text = "ft^2" Then
TextBox2.Text = Val(TextBox1.Text) * 107639 & " ft^2 "
Else
If ComboBox1.Text = "ft^2" And ComboBox2.Text = "hectarea" Then
TextBox2.Text = Val(TextBox1.Text) / 107639 & " hectarea "
Else
If ComboBox1.Text = "hectarea" And ComboBox2.Text = "in^2" Then
TextBox2.Text = Val(TextBox1.Text) * 15500000.0 & " in^2 "
Else
If ComboBox1.Text = "in^2" And ComboBox2.Text = "hectarea" Then
TextBox2.Text = Val(TextBox1.Text) / 15500000.0 & " hectarea "
Else
If ComboBox1.Text = "hectarea" And ComboBox2.Text = "acre" Then
TextBox2.Text = Val(TextBox1.Text) * 2.47105 & " acre "
Else
If ComboBox1.Text = "acre" And ComboBox2.Text = "hectarea" Then
TextBox2.Text = Val(TextBox1.Text) / 2.47105 & " hectarea "
Else
If ComboBox1.Text = "hectarea" And ComboBox2.Text = "cm^2" Then
TextBox2.Text = Val(TextBox1.Text) * 100000000.0 & " cm^2 "
Else
If ComboBox1.Text = "cm^2" And ComboBox2.Text = "hectarea" Then
TextBox2.Text = Val(TextBox1.Text) / 100000000.0 & " hectarea "
Else
If ComboBox1.Text = "hectarea" And ComboBox2.Text = "circular miles"
Then
TextBox2.Text = Val(TextBox1.Text) * 19735250000000.0 & " circular
miles "
Else
If ComboBox1.Text = "circular miles" And ComboBox2.Text = "hectarea"
Then
TextBox2.Text = Val(TextBox1.Text) / 19735250000000.0 & "
hectarea "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "ft^2" And ComboBox2.Text = "ft^2" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " ft^2 "
Else
If ComboBox1.Text = "ft^2" And ComboBox2.Text = "in^2" Then
TextBox2.Text = Val(TextBox1.Text) * 144 & " in^2 "
Else
If ComboBox1.Text = "in^2" And ComboBox2.Text = "ft^2" Then
TextBox2.Text = Val(TextBox1.Text) / 144 & " ft^2 "
Else
If ComboBox1.Text = "ft^2" And ComboBox2.Text = "acre" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000022957 & " acre "
Else
If ComboBox1.Text = "acre" And ComboBox2.Text = "ft^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000022957 & " ft^2 "
Else
If ComboBox1.Text = "ft^2" And ComboBox2.Text = "cm^2" Then
TextBox2.Text = Val(TextBox1.Text) * 929.03 & " cm^2 "
Else
If ComboBox1.Text = "cm^2" And ComboBox2.Text = "ft^2" Then
TextBox2.Text = Val(TextBox1.Text) / 929.03 & " ft^2 "
Else
If ComboBox1.Text = "ft^2" And ComboBox2.Text = "circular miles" Then
TextBox2.Text = Val(TextBox1.Text) * 183346494 & " circular miles "
Else
If ComboBox1.Text = "circular miles" And ComboBox2.Text = "ft^2" Then
TextBox2.Text = Val(TextBox1.Text) / 183346494 & " ft^2 "
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "in^2" And ComboBox2.Text = "in^2" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " in^2 "

VISUAL BASIC STUDIO P á g i n a 42 | 62


Else
If ComboBox1.Text = "in^2" And ComboBox2.Text = "acre" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000000159423 & " acre "
Else
If ComboBox1.Text = "acre" And ComboBox2.Text = "in^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000000159423 & " m^2 "
Else
If ComboBox1.Text = "in^2" And ComboBox2.Text = "cm^2" Then
TextBox2.Text = Val(TextBox1.Text) * 6.4516 & " cm^2 "
Else
If ComboBox1.Text = "cm^2" And ComboBox2.Text = "in^2" Then
TextBox2.Text = Val(TextBox1.Text) / 6.4516 & " in^2 "
Else
If ComboBox1.Text = "in^2" And ComboBox2.Text = "circular miles" Then
TextBox2.Text = Val(TextBox1.Text) * 1273239.5447352 & " circular miles "
Else
If ComboBox1.Text = "circular miles" And ComboBox2.Text = "in^2" Then
TextBox2.Text = Val(TextBox1.Text) / 1273239.5447352 & " in^2 "
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "acre" And ComboBox2.Text = "acre" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " acre "
Else
If ComboBox1.Text = "acre" And ComboBox2.Text = "cm^2" Then
TextBox2.Text = Val(TextBox1.Text) * 40470000.0 & " cm^2 "
Else
If ComboBox1.Text = "cm^2" And ComboBox2.Text = "acre" Then
TextBox2.Text = Val(TextBox1.Text) / 40470000.0 & " acre "
Else
If ComboBox1.Text = "acre" And ComboBox2.Text = "circular miles" Then
TextBox2.Text = Val(TextBox1.Text) * 7986606000000.0 & " circular miles "
Else
If ComboBox1.Text = "circular miles" And ComboBox2.Text = "acre" Then
TextBox2.Text = Val(TextBox1.Text) / 7986606000000.0 & " acre "
End If
End If
End If
End If
End If

If ComboBox1.Text = "cm^2" And ComboBox2.Text = "cm^2" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " cm^2 "
Else
If ComboBox1.Text = "cm^2" And ComboBox2.Text = "circular miles" Then
TextBox2.Text = Val(TextBox1.Text) * 197352.5 & " circular miles "
Else
If ComboBox1.Text = "circular miles" And ComboBox2.Text = "cm^2" Then
TextBox2.Text = Val(TextBox1.Text) / 197352.5 & " cm^2 "
End If
End If
End If

If ComboBox1.Text = "circular miles" And ComboBox2.Text = "circular miles" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " circular miles "
End If
End If

VOLUMEN
If Vol.Text = "VOLUMEN" Then
If ComboBox1.Text = "m^3" And ComboBox2.Text = "m^3" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " m^3 "
Else
If ComboBox1.Text = "m^3" And ComboBox2.Text = "ft^3" Then
TextBox2.Text = Val(TextBox1.Text) * 35.3147 & " ft^3 "
Else
If ComboBox1.Text = "ft^3" And ComboBox2.Text = "m^3" Then
TextBox2.Text = Val(TextBox1.Text) / 35.3147 & " m^3 "
Else
If ComboBox1.Text = "m^3" And ComboBox2.Text = "in^3" Then
TextBox2.Text = Val(TextBox1.Text) * 61023.7 & " in^3 "
Else
If ComboBox1.Text = "in^3" And ComboBox2.Text = "m^3" Then
TextBox2.Text = Val(TextBox1.Text) / 61023.7 & " m^3 "
Else
If ComboBox1.Text = "m^3" And ComboBox2.Text = "galon" Then
TextBox2.Text = Val(TextBox1.Text) * 264.172 & " galon "
Else
If ComboBox1.Text = "galon" And ComboBox2.Text = "m^3" Then
TextBox2.Text = Val(TextBox1.Text) / 264.172 & " m^3 "
Else
If ComboBox1.Text = "m^3" And ComboBox2.Text = "litro" Then

VISUAL BASIC STUDIO P á g i n a 43 | 62


TextBox2.Text = Val(TextBox1.Text) * 1000 & " litro "
Else
If ComboBox1.Text = "litro" And ComboBox2.Text = "m^3" Then
TextBox2.Text = Val(TextBox1.Text) / 1000 & " m^3 "
Else
If ComboBox1.Text = "m^3" And ComboBox2.Text = "cm^3" Then
TextBox2.Text = Val(TextBox1.Text) * 1000000 & " cm^3 "
Else
If ComboBox1.Text = "cm^3" And ComboBox2.Text = "m^3" Then
TextBox2.Text = Val(TextBox1.Text) / 1000000 & " m^3 "
Else
If ComboBox1.Text = "m^3" And ComboBox2.Text = "mm^3" Then
TextBox2.Text = Val(TextBox1.Text) * 1000000000 & " mm^3 "
Else
If ComboBox1.Text = "mm^3" And ComboBox2.Text = "m^3" Then
TextBox2.Text = Val(TextBox1.Text) / 1000000000 & " m^3
"
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "ft^3" And ComboBox2.Text = "ft^3" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " ft^3 "
Else
If ComboBox1.Text = "ft^3" And ComboBox2.Text = "in^3" Then
TextBox2.Text = Val(TextBox1.Text) * 1728 & " in^3 "
Else
If ComboBox1.Text = "in^3" And ComboBox2.Text = "ft^3" Then
TextBox2.Text = Val(TextBox1.Text) / 1728 & " ft^3 "
Else
If ComboBox1.Text = "ft^3" And ComboBox2.Text = "galon" Then
TextBox2.Text = Val(TextBox1.Text) * 7.48052 & " galon "
Else
If ComboBox1.Text = "galon" And ComboBox2.Text = "ft^3" Then
TextBox2.Text = Val(TextBox1.Text) / 7.48052 & " ft^3 "
Else
If ComboBox1.Text = "ft^3" And ComboBox2.Text = "litro" Then
TextBox2.Text = Val(TextBox1.Text) * 28.3168 & " litro "
Else
If ComboBox1.Text = "litro" And ComboBox2.Text = "ft^3" Then
TextBox2.Text = Val(TextBox1.Text) / 28.3168 & " ft^3 "
Else
If ComboBox1.Text = "ft^3" And ComboBox2.Text = "cm^3" Then
TextBox2.Text = Val(TextBox1.Text) * 28316.8 & " cm^3 "
Else
If ComboBox1.Text = "cm^3" And ComboBox2.Text = "ft^3" Then
TextBox2.Text = Val(TextBox1.Text) / 28316.8 & " ft^3 "
Else
If ComboBox1.Text = "ft^3" And ComboBox2.Text = "mm^3" Then
TextBox2.Text = Val(TextBox1.Text) * 28320000.0 & " mm^3 "
Else
If ComboBox1.Text = "mm^3" And ComboBox2.Text = "ft^3" Then
TextBox2.Text = Val(TextBox1.Text) / 28320000.0 & " ft^3 "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "in^3" And ComboBox2.Text = "in^3" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " in^3 "
Else
If ComboBox1.Text = "in^3" And ComboBox2.Text = "galon" Then
TextBox2.Text = Val(TextBox1.Text) * 0.004329 & " galon "
Else
If ComboBox1.Text = "galon" And ComboBox2.Text = "in^3" Then
TextBox2.Text = Val(TextBox1.Text) / 0.004329 & " in^3 "
Else
If ComboBox1.Text = "in^3" And ComboBox2.Text = "litro" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0163871 & " litro "
Else
If ComboBox1.Text = "litro" And ComboBox2.Text = "in^3" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0163871 & " in^3 "
Else
If ComboBox1.Text = "in^3" And ComboBox2.Text = "cm^3" Then
TextBox2.Text = Val(TextBox1.Text) * 16.3871 & " cm^3 "
Else
If ComboBox1.Text = "cm^3" And ComboBox2.Text = "in^3" Then
TextBox2.Text = Val(TextBox1.Text) / 16.3871 & " in^3 "
Else
If ComboBox1.Text = "in^3" And ComboBox2.Text = "mm^3" Then
TextBox2.Text = Val(TextBox1.Text) * 16387.1 & " mm^3 "
Else

VISUAL BASIC STUDIO P á g i n a 44 | 62


If ComboBox1.Text = "mm^3" And ComboBox2.Text = "in^3" Then
TextBox2.Text = Val(TextBox1.Text) / 16387.1 & " in^3 "
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "galon" And ComboBox2.Text = "galon" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " galon "
Else
If ComboBox1.Text = "galon" And ComboBox2.Text = "litro" Then
TextBox2.Text = Val(TextBox1.Text) * 3.78541 & " litro "
Else
If ComboBox1.Text = "litro" And ComboBox2.Text = "galon" Then
TextBox2.Text = Val(TextBox1.Text) / 3.78541 & " galon"
Else
If ComboBox1.Text = "galon" And ComboBox2.Text = "cm^3" Then
TextBox2.Text = Val(TextBox1.Text) * 3785.41 & " cm^3 "
Else
If ComboBox1.Text = "cm^3" And ComboBox2.Text = "galon" Then
TextBox2.Text = Val(TextBox1.Text) / 3785.41 & " galon "
Else
If ComboBox1.Text = "galon" And ComboBox2.Text = "mm^3" Then
TextBox2.Text = Val(TextBox1.Text) * 3785000.0 & " mm^3 "
Else
If ComboBox1.Text = "mm^3" And ComboBox2.Text = "galon" Then
TextBox2.Text = Val(TextBox1.Text) / 3785000.0 & " galon "
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "litro" And ComboBox2.Text = "litro" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " litro "
Else
If ComboBox1.Text = "litro" And ComboBox2.Text = "cm^3" Then
TextBox2.Text = Val(TextBox1.Text) * 1000 & " cm^3 "
Else
If ComboBox1.Text = "cm^3" And ComboBox2.Text = "litro" Then
TextBox2.Text = Val(TextBox1.Text) / 1000 & " litro "
Else
If ComboBox1.Text = "litro" And ComboBox2.Text = "mm^3" Then
TextBox2.Text = Val(TextBox1.Text) * 1000000 & " mm^3 "
Else
If ComboBox1.Text = "mm^3" And ComboBox2.Text = "litro" Then
TextBox2.Text = Val(TextBox1.Text) / 1000000 & " litro "
End If
End If
End If
End If
End If

If ComboBox1.Text = "cm^3" And ComboBox2.Text = "cm^3" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " cm^3 "
Else
If ComboBox1.Text = "cm^3" And ComboBox2.Text = "mm^3" Then
TextBox2.Text = Val(TextBox1.Text) * 1000 & " mm^3 "
Else
If ComboBox1.Text = "mm^3" And ComboBox2.Text = "cm^3" Then
TextBox2.Text = Val(TextBox1.Text) / 1000 & " cm^3 "
End If
End If
End If

If ComboBox1.Text = "mm^3" And ComboBox2.Text = "mm^3" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " mm^3 "
End If
End If

TIEMPO
If Tiem.Text = "TIEMPO" Then
If ComboBox1.Text = "año" And ComboBox2.Text = "año" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " año "
Else
If ComboBox1.Text = "año" And ComboBox2.Text = "dia sideral" Then
TextBox2.Text = Val(TextBox1.Text) * 365.999 & " dia sideral "
Else
If ComboBox1.Text = "dia sideral" And ComboBox2.Text = "año" Then

VISUAL BASIC STUDIO P á g i n a 45 | 62


TextBox2.Text = Val(TextBox1.Text) / 365.999 & " año "
Else
If ComboBox1.Text = "año" And ComboBox2.Text = "dias" Then
TextBox2.Text = Val(TextBox1.Text) * 365 & " dias "
Else
If ComboBox1.Text = "dias" And ComboBox2.Text = "año" Then
TextBox2.Text = Val(TextBox1.Text) / 365 & " año "
Else
If ComboBox1.Text = "año" And ComboBox2.Text = "horas" Then
TextBox2.Text = Val(TextBox1.Text) * 8760 & " horas "
Else
If ComboBox1.Text = "horas" And ComboBox2.Text = "año" Then
TextBox2.Text = Val(TextBox1.Text) / 8760 & " año "
Else
If ComboBox1.Text = "año" And ComboBox2.Text = "minutos" Then
TextBox2.Text = Val(TextBox1.Text) * 525600 & " minutos "
Else
If ComboBox1.Text = "minutos" And ComboBox2.Text = "año" Then
TextBox2.Text = Val(TextBox1.Text) / 525600 & " año "
Else
If ComboBox1.Text = "año" And ComboBox2.Text = "segundos" Then
TextBox2.Text = Val(TextBox1.Text) * 31540000.0 & " segundos "
Else
If ComboBox1.Text = "segundos" And ComboBox2.Text = "año" Then
TextBox2.Text = Val(TextBox1.Text) / 31540000.0 & " año "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "dia sideral" And ComboBox2.Text = "dia sideral" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " dia sideral "
Else
If ComboBox1.Text = "dia sideral" And ComboBox2.Text = "dias" Then
TextBox2.Text = Val(TextBox1.Text) * 0.99727 & " dias "
Else
If ComboBox1.Text = "dias" And ComboBox2.Text = "dia sideral" Then
TextBox2.Text = Val(TextBox1.Text) / 0.99727 & " dia sideral "
Else
If ComboBox1.Text = "dia sideral" And ComboBox2.Text = "horas" Then
TextBox2.Text = Val(TextBox1.Text) * 23.9345 & " horas "
Else
If ComboBox1.Text = "horas" And ComboBox2.Text = "adia sideralño" Then
TextBox2.Text = Val(TextBox1.Text) / 23.9345 & " dia sideral "
Else
If ComboBox1.Text = "dia sideral" And ComboBox2.Text = "minutos" Then
TextBox2.Text = Val(TextBox1.Text) * 1436.07 & " minutos "
Else
If ComboBox1.Text = "minutos" And ComboBox2.Text = "dia sideral" Then
TextBox2.Text = Val(TextBox1.Text) / 1436.07 & " dia sideral "
Else
If ComboBox1.Text = "dia sideral" And ComboBox2.Text = "segundos" Then
TextBox2.Text = Val(TextBox1.Text) * 86164.1 & " segundos "
Else
If ComboBox1.Text = "segundos" And ComboBox2.Text = "dia sideral" Then
TextBox2.Text = Val(TextBox1.Text) / 86164.1 & " dia sideral "
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "dias" And ComboBox2.Text = "dias" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " dias "
Else
If ComboBox1.Text = "dias" And ComboBox2.Text = "horas" Then
TextBox2.Text = Val(TextBox1.Text) * 24 & " horas "
Else
If ComboBox1.Text = "horas" And ComboBox2.Text = "dias" Then
TextBox2.Text = Val(TextBox1.Text) / 24 & " dias "
Else
If ComboBox1.Text = "dias" And ComboBox2.Text = "minutos" Then
TextBox2.Text = Val(TextBox1.Text) * 1440 & " minutos "
Else
If ComboBox1.Text = "minutos" And ComboBox2.Text = "dias" Then
TextBox2.Text = Val(TextBox1.Text) / 1440 & " dias "
Else
If ComboBox1.Text = "dias" And ComboBox2.Text = "segundos" Then
TextBox2.Text = Val(TextBox1.Text) * 86400 & " segundos "
Else
If ComboBox1.Text = "segundos" And ComboBox2.Text = "dias" Then
TextBox2.Text = Val(TextBox1.Text) / 86400 & " dias "
End If
End If
End If
End If
End If
End If

VISUAL BASIC STUDIO P á g i n a 46 | 62


End If

If ComboBox1.Text = "horas" And ComboBox2.Text = "horas" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " horas "
Else
If ComboBox1.Text = "horas" And ComboBox2.Text = "minutos" Then
TextBox2.Text = Val(TextBox1.Text) * 60 & " minutos "
Else
If ComboBox1.Text = "minutos" And ComboBox2.Text = "horas" Then
TextBox2.Text = Val(TextBox1.Text) / 60 & " horas "
Else
If ComboBox1.Text = "horas" And ComboBox2.Text = "segundos" Then
TextBox2.Text = Val(TextBox1.Text) * 3600 & " segundos "
Else
If ComboBox1.Text = "segundos" And ComboBox2.Text = "horas" Then
TextBox2.Text = Val(TextBox1.Text) / 3600 & " horas "
End If
End If
End If
End If
End If

If ComboBox1.Text = "minutos" And ComboBox2.Text = "minutos" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " minutos "
Else
If ComboBox1.Text = "minutos" And ComboBox2.Text = "segundos" Then
TextBox2.Text = Val(TextBox1.Text) * 60 & " segundos "
Else
If ComboBox1.Text = "segundos" And ComboBox2.Text = "minutos" Then
TextBox2.Text = Val(TextBox1.Text) / 60 & " minutos "
End If
End If
End If

If ComboBox1.Text = "segundos" And ComboBox2.Text = "segundos" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " segundos "
End If
End If

FRECUENCIA
If Frecu.Text = "FRECUENCIA" Then
If ComboBox1.Text = "hertz" And ComboBox2.Text = "hertz" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " hertz "
Else
If ComboBox1.Text = "hertz" And ComboBox2.Text = "ciclo" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " ciclo "
Else
If ComboBox1.Text = "ciclo" And ComboBox2.Text = "hertz" Then
TextBox2.Text = Val(TextBox1.Text) / 1 & " hertz "
End If
End If
End If

If ComboBox1.Text = "ciclo" And ComboBox2.Text = "ciclo" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " ciclo "
End If
End If

VELOCIDAD
If Velo.Text = "VELOCIDAD" Then
If ComboBox1.Text = "m/s" And ComboBox2.Text = "m/s" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " m/s "
Else
If ComboBox1.Text = "m/s" And ComboBox2.Text = "km/h" Then
TextBox2.Text = Val(TextBox1.Text) * 3.6 & " km/h "
Else
If ComboBox1.Text = "km/h" And ComboBox2.Text = "m/s" Then
TextBox2.Text = Val(TextBox1.Text) / 3.6 & " m/s "
Else
If ComboBox1.Text = "m/s" And ComboBox2.Text = "milla/hora" Then
TextBox2.Text = Val(TextBox1.Text) * 2.23694 & " milla/hora "
Else
If ComboBox1.Text = "milla/hora" And ComboBox2.Text = "m/s" Then
TextBox2.Text = Val(TextBox1.Text) / 2.23694 & " m/s "
Else
If ComboBox1.Text = "m/s" And ComboBox2.Text = "nudos" Then
TextBox2.Text = Val(TextBox1.Text) * 1.94384 & " nudos "
Else
If ComboBox1.Text = "nudos" And ComboBox2.Text = "m/s" Then
TextBox2.Text = Val(TextBox1.Text) / 1.94384 & " m/s "
Else
If ComboBox1.Text = "m/s" And ComboBox2.Text = "ft/s" Then
TextBox2.Text = Val(TextBox1.Text) * 3.28084 & " ft/s "
Else

VISUAL BASIC STUDIO P á g i n a 47 | 62


If ComboBox1.Text = "ft/s" And ComboBox2.Text = "m/s" Then
TextBox2.Text = Val(TextBox1.Text) / 3.28084 & " m/s "
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "km/h" And ComboBox2.Text = "km/h" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " km/h "
Else
If ComboBox1.Text = "km/s" And ComboBox2.Text = "milla/hora" Then
TextBox2.Text = Val(TextBox1.Text) * 0.621371 & " milla/hora "
Else
If ComboBox1.Text = "milla/hora" And ComboBox2.Text = "km/s" Then
TextBox2.Text = Val(TextBox1.Text) / 0.621371 & " km/s "
Else
If ComboBox1.Text = "km/s" And ComboBox2.Text = "nudos" Then
TextBox2.Text = Val(TextBox1.Text) * 0.539957 & " nudos "
Else
If ComboBox1.Text = "nudos" And ComboBox2.Text = "km/s" Then
TextBox2.Text = Val(TextBox1.Text) / 0.539957 & " km/s "
Else
If ComboBox1.Text = "km/s" And ComboBox2.Text = "ft/s" Then
TextBox2.Text = Val(TextBox1.Text) * 0.911344 & " ft/s "
Else
If ComboBox1.Text = "ft/s" And ComboBox2.Text = "km/s" Then
TextBox2.Text = Val(TextBox1.Text) / 0.911344 & " km/s "
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "milla/hora" And ComboBox2.Text = "milla/hora" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " milla/hora "
Else
If ComboBox1.Text = "milla/hora" And ComboBox2.Text = "nudos" Then
TextBox2.Text = Val(TextBox1.Text) * 0.868976 & " nudos "
Else
If ComboBox1.Text = "nudos" And ComboBox2.Text = "milla/hora" Then
TextBox2.Text = Val(TextBox1.Text) / 0.868976 & " milla/hora "
Else
If ComboBox1.Text = "milla/hora" And ComboBox2.Text = "ft/s" Then
TextBox2.Text = Val(TextBox1.Text) * 1.46667 & " ft/s "
Else
If ComboBox1.Text = "ft/s" And ComboBox2.Text = "milla/hora" Then
TextBox2.Text = Val(TextBox1.Text) / 1.46667 & " milla/hora "
End If
End If
End If
End If
End If

If ComboBox1.Text = "nudos" And ComboBox2.Text = "nudos" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " nudos "
Else
If ComboBox1.Text = "nudos" And ComboBox2.Text = "ft/s" Then
TextBox2.Text = Val(TextBox1.Text) * 1.68781 & " ft/s "
Else
If ComboBox1.Text = "ft/s" And ComboBox2.Text = "nudos" Then
TextBox2.Text = Val(TextBox1.Text) / 1.68781 & " nudos "
End If
End If
End If

If ComboBox1.Text = "ft/s" And ComboBox2.Text = "ft/s" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " ft/s "
End If
End If

MASA
If Mas.Text = "MASA" Then
If ComboBox1.Text = "kg" And ComboBox2.Text = "kg" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " kg "
Else
If ComboBox1.Text = "kg" And ComboBox2.Text = "lbm" Then
TextBox2.Text = Val(TextBox1.Text) * 2.2046 & " lbm "
Else
If ComboBox1.Text = "lbm" And ComboBox2.Text = "kg" Then

VISUAL BASIC STUDIO P á g i n a 48 | 62


TextBox2.Text = Val(TextBox1.Text) / 2.2046 & " kg "
Else
If ComboBox1.Text = "kg" And ComboBox2.Text = "slug" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0685218 & " slug "
Else
If ComboBox1.Text = "slug" And ComboBox2.Text = "kg" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0685218 & " kg "
End If
End If
End If
End If
End If

If ComboBox1.Text = "lbm" And ComboBox2.Text = "lbm" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " lbm "
Else
If ComboBox1.Text = "lbm" And ComboBox2.Text = "slug" Then
TextBox2.Text = Val(TextBox1.Text) * 0.031080925 & " slug "
Else
If ComboBox1.Text = "slug" And ComboBox2.Text = "lbm" Then
TextBox2.Text = Val(TextBox1.Text) / 0.031080925 & " lbm "
End If
End If
End If

If ComboBox1.Text = "slug" And ComboBox2.Text = "slug" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " slug "
End If
End If

DENSIDAD
If Dens.Text = "DENSIDAD" Then
If ComboBox1.Text = "g/cm^3" And ComboBox2.Text = "g/cm^3" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " g/cm^3 "
Else
If ComboBox1.Text = "g/cm^3" And ComboBox2.Text = "kg/m^3" Then
TextBox2.Text = Val(TextBox1.Text) * 1000 & " kg/m^3 "
Else
If ComboBox1.Text = "kg/m^3" And ComboBox2.Text = "g/cm^3" Then
TextBox2.Text = Val(TextBox1.Text) / 1000 & " mg/cm^3 "
Else
If ComboBox1.Text = "g/cm^3" And ComboBox2.Text = "lbm/ft^3" Then
TextBox2.Text = Val(TextBox1.Text) * 62.428 & " lbm/ft^3 "
Else
If ComboBox1.Text = "lbm/ft^3" And ComboBox2.Text = "g/cm^3" Then
TextBox2.Text = Val(TextBox1.Text) / 62.428 & " g/cm^3 "
Else
If ComboBox1.Text = "g/cm^3" And ComboBox2.Text = "slug/ft^3" Then
TextBox2.Text = Val(TextBox1.Text) * 1.94032 & " slug/ft^3 "
Else
If ComboBox1.Text = "slug/ft^3" And ComboBox2.Text = "g/cm^3" Then
TextBox2.Text = Val(TextBox1.Text) / 1.94032 & " g/cm^3 "
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "kg/m^3" And ComboBox2.Text = "kg/m^3" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " kg/m^3 "
Else
If ComboBox1.Text = "kg/cm^3" And ComboBox2.Text = "lbm/ft^3" Then
TextBox2.Text = Val(TextBox1.Text) * 62427.94 & " lbm/ft^3 "
Else
If ComboBox1.Text = "lbm/ft^3" And ComboBox2.Text = "kg/cm^3" Then
TextBox2.Text = Val(TextBox1.Text) / 62427.96 & " kg/cm^3 "
Else
If ComboBox1.Text = "kg/cm^3" And ComboBox2.Text = "slug/ft^3" Then
TextBox2.Text = Val(TextBox1.Text) * 1940.3203319541 & " slug/ft^3 "
Else
If ComboBox1.Text = "slug/ft^3" And ComboBox2.Text = "kg/cm^3" Then
TextBox2.Text = Val(TextBox1.Text) / 1940.3203319541 & " kg/cm^3 "
End If
End If
End If
End If
End If

If ComboBox1.Text = "lbm/ft^3" And ComboBox2.Text = "lbm/ft^3" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " lbm/ft^3 "

VISUAL BASIC STUDIO P á g i n a 49 | 62


Else
If ComboBox1.Text = "lbm/ft^3" And ComboBox2.Text = "slug/ft^3" Then
TextBox2.Text = Val(TextBox1.Text) * 0.031081 & " slug/ft^3 "
Else
If ComboBox1.Text = "slug/ft^3" And ComboBox2.Text = "lbm/ft^3" Then
TextBox2.Text = Val(TextBox1.Text) / 0.031081 & " lbm/ft^3 "
End If
End If
End If
If ComboBox1.Text = "slug/ft^3" And ComboBox2.Text = "slug/ft^3" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " slug/ft^3 "
End If
End If

FUERZA
If Fuer.Text = "FUERZA" Then
If ComboBox1.Text = "newton" And ComboBox2.Text = "newton" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " newton "
Else
If ComboBox1.Text = "newton" And ComboBox2.Text = "dinas" Then
TextBox2.Text = Val(TextBox1.Text) * 100000 & " dinas "
Else
If ComboBox1.Text = "dinas" And ComboBox2.Text = "newton" Then
TextBox2.Text = Val(TextBox1.Text) / 100000 & " newton "
Else
If ComboBox1.Text = "newton" And ComboBox2.Text = "kg newton" Then
TextBox2.Text = Val(TextBox1.Text) * 1.101972 & " kg newton "
Else
If ComboBox1.Text = "kg newton" And ComboBox2.Text = "newton" Then
TextBox2.Text = Val(TextBox1.Text) / 1.101972 & " newton "
Else
If ComboBox1.Text = "newton" And ComboBox2.Text = "lb" Then
TextBox2.Text = Val(TextBox1.Text) * 0.2248 & " lb "
Else
If ComboBox1.Text = "lb" And ComboBox2.Text = "newton" Then
TextBox2.Text = Val(TextBox1.Text) / 0.2248 & " newton "
Else
If ComboBox1.Text = "newton" And ComboBox2.Text = "lbf" Then
TextBox2.Text = Val(TextBox1.Text) * 0.22480894309971 & " lbf "
Else
If ComboBox1.Text = "lbf" And ComboBox2.Text = "newton" Then
TextBox2.Text = Val(TextBox1.Text) / 0.22480894309971 & " newton "
Else
If ComboBox1.Text = "newton" And ComboBox2.Text = "poundls" Then
TextBox2.Text = Val(TextBox1.Text) * 7.23301 & " poundls "
Else
If ComboBox1.Text = "poundls" And ComboBox2.Text = "newton" Then
TextBox2.Text = Val(TextBox1.Text) / 7.23301 & " newton "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "dinas" And ComboBox2.Text = "dinas" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " dinas "
Else
If ComboBox1.Text = "dinas" And ComboBox2.Text = "kg newton" Then
TextBox2.Text = Val(TextBox1.Text) * 0.00000101972 & " kg newton "
Else
If ComboBox1.Text = "kg newton" And ComboBox2.Text = "dinas" Then
TextBox2.Text = Val(TextBox1.Text) / 0.00000101972 & " dinas "
Else
If ComboBox1.Text = "dinas" And ComboBox2.Text = "lb" Then
TextBox2.Text = Val(TextBox1.Text) * 0.00102 & " lb "
Else
If ComboBox1.Text = "lb" And ComboBox2.Text = "dinas" Then
TextBox2.Text = Val(TextBox1.Text) / 0.00102 & " dinas "
Else
If ComboBox1.Text = "dinas" And ComboBox2.Text = "lbf" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0000022481 & " lbf "
Else
If ComboBox1.Text = "lbf" And ComboBox2.Text = "dinas" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000002248 & " dinas "
Else
If ComboBox1.Text = "dinas" And ComboBox2.Text = "poundls" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0000723301 & " poundls "
Else
If ComboBox1.Text = "poundls" And ComboBox2.Text = "dinas" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0000723301 & " dinas "
End If

VISUAL BASIC STUDIO P á g i n a 50 | 62


End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "kg newton" And ComboBox2.Text = "kg newton" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " kg newton "
Else
If ComboBox1.Text = "kg newton" And ComboBox2.Text = "lb" Then
TextBox2.Text = Val(TextBox1.Text) * 224.808492507512 & " lb "
Else
If ComboBox1.Text = "lb" And ComboBox2.Text = "kg newton" Then
TextBox2.Text = Val(TextBox1.Text) / 224.808492507512 & " kg newton "
Else
If ComboBox1.Text = "kg newton" And ComboBox2.Text = "lbf" Then
TextBox2.Text = Val(TextBox1.Text) * 224.80894309971 & " lbf "
Else
If ComboBox1.Text = "lbf" And ComboBox2.Text = "kg newton" Then
TextBox2.Text = Val(TextBox1.Text) / 224.80894309971 & " kg newton "
Else
If ComboBox1.Text = "kg newton" And ComboBox2.Text = "poundls" Then
TextBox2.Text = Val(TextBox1.Text) * 7233.01385120989 & " poundls "
Else
If ComboBox1.Text = "poundls" And ComboBox2.Text = "kg newton" Then
TextBox2.Text = Val(TextBox1.Text) / 7233.01385120989 & " kg newton "
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "lb" And ComboBox2.Text = "lb" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " lb "
Else
If ComboBox1.Text = "lb" And ComboBox2.Text = "lbf" Then
TextBox2.Text = Val(TextBox1.Text) * 453.592292197 & " lbf "
Else
If ComboBox1.Text = "lbf" And ComboBox2.Text = "lb" Then
TextBox2.Text = Val(TextBox1.Text) / 453.592292197 & " lb "
Else
If ComboBox1.Text = "lb" And ComboBox2.Text = "poundls" Then
TextBox2.Text = Val(TextBox1.Text) * 1.0 & " poundls "
Else
If ComboBox1.Text = "poundls" And ComboBox2.Text = "lb" Then
TextBox2.Text = Val(TextBox1.Text) / 1.0 & " lb "
End If
End If
End If
End If
End If

If ComboBox1.Text = "lbf" And ComboBox2.Text = "lbf" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " lbf "
Else
If ComboBox1.Text = "lbf" And ComboBox2.Text = "poundls" Then
TextBox2.Text = Val(TextBox1.Text) * 32.74 & " poundls "
Else
If ComboBox1.Text = "poundls" And ComboBox2.Text = "lbf" Then
TextBox2.Text = Val(TextBox1.Text) / 32.74 & " lbf "
End If
End If
End If

If ComboBox1.Text = "poundls" And ComboBox2.Text = "poundls" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " poundls "
End If
End If

PRESION
If Pres.Text = "PRESION" Then
If ComboBox1.Text = "N/m^2" And ComboBox2.Text = "N/m^2" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " N/m^2 "
Else
If ComboBox1.Text = "N/m^2" And ComboBox2.Text = "atm" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0009869 & " atm "
Else
If ComboBox1.Text = "atm" And ComboBox2.Text = "N/m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0009869 & " N/m^2 "
Else
If ComboBox1.Text = "N/m^2" And ComboBox2.Text = "lb/in^2" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000145 & " lb/in^2 "

VISUAL BASIC STUDIO P á g i n a 51 | 62


Else
If ComboBox1.Text = "lb/in^2" And ComboBox2.Text = "N/m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000145 & " N/m^2 "
Else
If ComboBox1.Text = "N/m^2" And ComboBox2.Text = "lb/ft^2" Then
TextBox2.Text = Val(TextBox1.Text) * 0.02089 & " lb/ft^2 "
Else
If ComboBox1.Text = "lb/ft^2" And ComboBox2.Text = "N/m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.02089 & " N/m^2 "
Else
If ComboBox1.Text = "N/m^2" And ComboBox2.Text = "cmHg" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0007501 & " cmHg "
Else
If ComboBox1.Text = "cmHg" And ComboBox2.Text = "N/m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0007501 & " N/m^2 "
Else
If ComboBox1.Text = "N/m^2" And ComboBox2.Text = "in de agua" Then
TextBox2.Text = Val(TextBox1.Text) * 0.004015 & " in de agua "
Else
If ComboBox1.Text = "in de agua" And ComboBox2.Text = "N/m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.004015 & " N/m^2 "
Else
If ComboBox1.Text = "N/m^2" And ComboBox2.Text = "bar" Then
TextBox2.Text = Val(TextBox1.Text) * 0.00001 & " bar "
Else
If ComboBox1.Text = "bar" And ComboBox2.Text = "N/m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.00001 & " N/m^2 "
Else
If ComboBox1.Text = "N/m^2" And ComboBox2.Text = "kg
wt/m^2" Then
TextBox2.Text = Val(TextBox1.Text) * 0.102 & " kg
wt/m^2 "
Else
If ComboBox1.Text = "kg wt/m^2" And ComboBox2.Text =
"N/m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.102 & "
N/m^2 "
Else
If ComboBox1.Text = "N/m^2" And ComboBox2.Text =
"torr" Then
TextBox2.Text = Val(TextBox1.Text) * 0.075 &
" torr "
Else
If ComboBox1.Text = "torr" And
ComboBox2.Text = "N/m^2" Then
TextBox2.Text = Val(TextBox1.Text) /
0.075 & " N/m^2 "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "atm" And ComboBox2.Text = "atm" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " atm "
Else
If ComboBox1.Text = "atm" And ComboBox2.Text = "lb/in^2" Then
TextBox2.Text = Val(TextBox1.Text) * 14.6959 & " lb/in^2 "
Else
If ComboBox1.Text = "lb/in^2" And ComboBox2.Text = "atm" Then
TextBox2.Text = Val(TextBox1.Text) / 14.6959 & " atm "
Else
If ComboBox1.Text = "atm" And ComboBox2.Text = "lb/ft^2" Then
TextBox2.Text = Val(TextBox1.Text) * 2116.22 & " lb/ft^2 "
Else
If ComboBox1.Text = "lb/ft^2" And ComboBox2.Text = "atm" Then
TextBox2.Text = Val(TextBox1.Text) / 2116.22 & " atm "
Else
If ComboBox1.Text = "atm" And ComboBox2.Text = "cmHg" Then
TextBox2.Text = Val(TextBox1.Text) * 75.999989172561 & " cmHg "
Else
If ComboBox1.Text = "cmHg" And ComboBox2.Text = "atm" Then
TextBox2.Text = Val(TextBox1.Text) / 75.999989172561 & " atm "
Else
If ComboBox1.Text = "atm" And ComboBox2.Text = "in de agua" Then
TextBox2.Text = Val(TextBox1.Text) * 407.18935862402 & " in de agua "
Else
If ComboBox1.Text = "in de agua" And ComboBox2.Text = "atm" Then
TextBox2.Text = Val(TextBox1.Text) / 407.18935862402 & " atm "
Else
If ComboBox1.Text = "atm" And ComboBox2.Text = "bar" Then
TextBox2.Text = Val(TextBox1.Text) * 1.01325 & " bar "
Else
If ComboBox1.Text = "bar" And ComboBox2.Text = "atm" Then
TextBox2.Text = Val(TextBox1.Text) / 1.01325 & " atm "
Else
If ComboBox1.Text = "atm" And ComboBox2.Text = "kg wt/m^2" Then

VISUAL BASIC STUDIO P á g i n a 52 | 62


TextBox2.Text = Val(TextBox1.Text) * 10332.275 & " kg wt/m^2
"
Else
If ComboBox1.Text = "kg wt/m^2" And ComboBox2.Text = "atm"
Then
TextBox2.Text = Val(TextBox1.Text) / 10332.275 & " atm "
Else
If ComboBox1.Text = "atm" And ComboBox2.Text = "torr"
Then
TextBox2.Text = Val(TextBox1.Text) * 760 & " torr "
Else
If ComboBox1.Text = "torr" And ComboBox2.Text =
"atm" Then
TextBox2.Text = Val(TextBox1.Text) / 760 & " atm
"
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "lb/in^2" And ComboBox2.Text = "lb/in^2" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " lb/in^2 "
Else
If ComboBox1.Text = "lb/in^2" And ComboBox2.Text = "lb/ft^2" Then
TextBox2.Text = Val(TextBox1.Text) * 144 & " lb/ft^2 "
Else
If ComboBox1.Text = "lb/ft^2" And ComboBox2.Text = "lb/in^2" Then
TextBox2.Text = Val(TextBox1.Text) / 144 & " lb/in^2 "
Else
If ComboBox1.Text = "lb/in^2" And ComboBox2.Text = "cmHg" Then
TextBox2.Text = Val(TextBox1.Text) * 5.1715 & " cmHg "
Else
If ComboBox1.Text = "cmHg" And ComboBox2.Text = "lb/in^2" Then
TextBox2.Text = Val(TextBox1.Text) / 5.1715 & " lb/in^2 "
Else
If ComboBox1.Text = "lb/in^2" And ComboBox2.Text = "in de agua" Then
TextBox2.Text = Val(TextBox1.Text) * 27.6807 & " in de agua "
Else
If ComboBox1.Text = "in de agua" And ComboBox2.Text = "lb/in^2" Then
TextBox2.Text = Val(TextBox1.Text) / 27.6807 & " lb/in^2 "
Else
If ComboBox1.Text = "lb/in^2" And ComboBox2.Text = "bar" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0689476 & " bar "
Else
If ComboBox1.Text = "bar" And ComboBox2.Text = "lb/in^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0689476 & " lb/in^2 "
Else
If ComboBox1.Text = "lb/in^2" And ComboBox2.Text = "kg wt/m^2" Then
TextBox2.Text = Val(TextBox1.Text) * 703.0696 & " kg wt/m^2 "
Else
If ComboBox1.Text = "kg wt/m^2" And ComboBox2.Text = "lb/in^2" Then
TextBox2.Text = Val(TextBox1.Text) / 703.0696 & " lb/in^2 "
Else
If ComboBox1.Text = "lb/in^2" And ComboBox2.Text = "torr" Then
TextBox2.Text = Val(TextBox1.Text) * 51.7149 & " torr "
Else
If ComboBox1.Text = "torr" And ComboBox2.Text = "lb/in^2"
Then
TextBox2.Text = Val(TextBox1.Text) / 51.7149 & " lb/in^2
"
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "lb/ft^2" And ComboBox2.Text = "lb/ft^2" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " lb/ft^2 "
Else
If ComboBox1.Text = "lb/ft^2" And ComboBox2.Text = "cmHg" Then
TextBox2.Text = Val(TextBox1.Text) * 0.035913 & " cmHg "
Else
If ComboBox1.Text = "cmHg" And ComboBox2.Text = "lb/ft^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.035913 & " lb/ft^2 "
Else
If ComboBox1.Text = "lb/ft^2" And ComboBox2.Text = "in de agua" Then
TextBox2.Text = Val(TextBox1.Text) * 0.1922 & " in de agua "
Else
If ComboBox1.Text = "in de agua" And ComboBox2.Text = "lb/ft^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.1922 & " lb/ft^2 "

VISUAL BASIC STUDIO P á g i n a 53 | 62


Else
If ComboBox1.Text = "lb/ft^2" And ComboBox2.Text = "bar" Then
TextBox2.Text = Val(TextBox1.Text) * 0.00047880258888889 & " bar "
Else
If ComboBox1.Text = "bar" And ComboBox2.Text = "lb/ft^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.00047880258888889 & " lb/ft^2 "
Else
If ComboBox1.Text = "lb/ft^2" And ComboBox2.Text = "kg wt/m^2" Then
TextBox2.Text = Val(TextBox1.Text) * 4.88243 & " kg wt/m^2 "
Else
If ComboBox1.Text = "kg wt/m^2" And ComboBox2.Text = "lb/ft^2" Then
TextBox2.Text = Val(TextBox1.Text) / 4.88243 & " lb/in^2 "
Else
If ComboBox1.Text = "lb/ft^2" And ComboBox2.Text = "torr" Then
TextBox2.Text = Val(TextBox1.Text) * 0.35913147550511 & " torr "
Else
If ComboBox1.Text = "torr" And ComboBox2.Text = "lb/ft^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.35913147550511 & "
lb/ft^2 "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "cmHg" And ComboBox2.Text = "cmHg" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " cmHg "
Else
If ComboBox1.Text = "cmHg" And ComboBox2.Text = "in de agua" Then
TextBox2.Text = Val(TextBox1.Text) * 5.3525 & " in de agua "
Else
If ComboBox1.Text = "in de agua" And ComboBox2.Text = "cmHg" Then
TextBox2.Text = Val(TextBox1.Text) / 5.3525 & " cmHg "
Else
If ComboBox1.Text = "cmHg" And ComboBox2.Text = "bar" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0133 & " bar "
Else
If ComboBox1.Text = "bar" And ComboBox2.Text = "cmHg" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0133 & " cmHg "
Else
If ComboBox1.Text = "cmHg" And ComboBox2.Text = "kg wt/m^2" Then
TextBox2.Text = Val(TextBox1.Text) * 135.95 & " kg wt/m^2 "
Else
If ComboBox1.Text = "kg wt/m^2" And ComboBox2.Text = "cmHg" Then
TextBox2.Text = Val(TextBox1.Text) / 135.95 & " cmHg "
Else
If ComboBox1.Text = "cmHg" And ComboBox2.Text = "torr" Then
TextBox2.Text = Val(TextBox1.Text) * 10 & " torr "
Else
If ComboBox1.Text = "torr" And ComboBox2.Text = "cmHg" Then
TextBox2.Text = Val(TextBox1.Text) / 10 & " cmHg "
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "in de agua" And ComboBox2.Text = "in de agua" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " in de agua "
Else
If ComboBox1.Text = "in de agua" And ComboBox2.Text = "bar" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0025 & " bar "
Else
If ComboBox1.Text = "bar" And ComboBox2.Text = "in de agua" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0025 & " in de agua "
Else
If ComboBox1.Text = "in de agua" And ComboBox2.Text = "kg wt/m^2" Then
TextBox2.Text = Val(TextBox1.Text) * 25.3993 & " kg wt/m^2 "
Else
If ComboBox1.Text = "kg wt/m^2" And ComboBox2.Text = "in de agua" Then
TextBox2.Text = Val(TextBox1.Text) / 25.3993 & " in de agua "
Else
If ComboBox1.Text = "in de agua" And ComboBox2.Text = "torr" Then
TextBox2.Text = Val(TextBox1.Text) * 1.8683 & " torr "
Else
If ComboBox1.Text = "torr" And ComboBox2.Text = "in de agua" Then
TextBox2.Text = Val(TextBox1.Text) / 1.8683 & " in de agua "
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "bar" And ComboBox2.Text = "bar" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " bar "
Else
If ComboBox1.Text = "bar" And ComboBox2.Text = "kg wt/m^2" Then

VISUAL BASIC STUDIO P á g i n a 54 | 62


TextBox2.Text = Val(TextBox1.Text) * 10197.162 & " kg wt/m^2 "
Else
If ComboBox1.Text = "kg wt/m^2" And ComboBox2.Text = "bar" Then
TextBox2.Text = Val(TextBox1.Text) / 10197.162 & " bar "
Else
If ComboBox1.Text = "bar" And ComboBox2.Text = "torr" Then
TextBox2.Text = Val(TextBox1.Text) * 750.062 & " torr "
Else
If ComboBox1.Text = "torr" And ComboBox2.Text = "bar" Then
TextBox2.Text = Val(TextBox1.Text) / 750.062 & " bar "
End If
End If
End If
End If
End If

If ComboBox1.Text = "kg wt/m^2" And ComboBox2.Text = "kg wt/m^2" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " kg wt/m^2 "
Else
If ComboBox1.Text = "kg wt/m^2" And ComboBox2.Text = "torr" Then
TextBox2.Text = Val(TextBox1.Text) * 0.073555924018524 & " torr "
Else
If ComboBox1.Text = "torr" And ComboBox2.Text = "kg wt/m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 0.073555924018524 & " kg wt/m^2 "
End If
End If
End If

If ComboBox1.Text = "torr" And ComboBox2.Text = "torr" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " torr "
End If
End If

TRABAJO, ENERGIA Y CALOR


If Trabaj.Text = "TRABAJO, ENERGIA Y CALOR" Then
If ComboBox1.Text = "joule" And ComboBox2.Text = "joule" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " joule "
Else
If ComboBox1.Text = "joule" And ComboBox2.Text = "cal" Then
TextBox2.Text = Val(TextBox1.Text) * 0.2389 & " cal "
Else
If ComboBox1.Text = "cal" And ComboBox2.Text = "joule" Then
TextBox2.Text = Val(TextBox1.Text) / 0.2389 & " joule "
Else
If ComboBox1.Text = "joule" And ComboBox2.Text = "btu" Then
TextBox2.Text = Val(TextBox1.Text) * 0.0009481 & " btu "
Else
If ComboBox1.Text = "btu" And ComboBox2.Text = "joule" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0009481 & " joule "
Else
If ComboBox1.Text = "joule" And ComboBox2.Text = "ft/lb" Then
TextBox2.Text = Val(TextBox1.Text) * 0.7376 & " ft/lb "
Else
If ComboBox1.Text = "ft/lb" And ComboBox2.Text = "joule" Then
TextBox2.Text = Val(TextBox1.Text) / 0.7376 & " joule "
Else
If ComboBox1.Text = "joule" And ComboBox2.Text = "ergios" Then
TextBox2.Text = Val(TextBox1.Text) * 10000000 & " ergios "
Else
If ComboBox1.Text = "ergios" And ComboBox2.Text = "joule" Then
TextBox2.Text = Val(TextBox1.Text) / 10000000 & " joule "
Else
If ComboBox1.Text = "joule" And ComboBox2.Text = "eV" Then
TextBox2.Text = Val(TextBox1.Text) * 6.242E+18 & " eV "
Else
If ComboBox1.Text = "eV" And ComboBox2.Text = "joule" Then
TextBox2.Text = Val(TextBox1.Text) / 6.242E+18 & " joule "
Else
If ComboBox1.Text = "joule" And ComboBox2.Text = "kcal" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000239 & " kcal "
Else
If ComboBox1.Text = "kcal" And ComboBox2.Text = "joule" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000239 & " joule
"
Else
If ComboBox1.Text = "joule" And ComboBox2.Text = "MeV"
Then
TextBox2.Text = Val(TextBox1.Text) * 6242000000000.0
& " MeV "
Else
If ComboBox1.Text = "MeV" And ComboBox2.Text =
"joule" Then

VISUAL BASIC STUDIO P á g i n a 55 | 62


TextBox2.Text = Val(TextBox1.Text) /
6242000000000.0 & " joule "
Else
If ComboBox1.Text = "joule" And ComboBox2.Text =
"kw/h" Then
TextBox2.Text = Val(TextBox1.Text) *
0.00000027777 & " kw/h "
Else
If ComboBox1.Text = "kw/h" And
ComboBox2.Text = "joule" Then
TextBox2.Text = Val(TextBox1.Text) /
0.00000027777 & " joule "
Else
If ComboBox1.Text = "joule" And
ComboBox2.Text = "hp/h" Then
TextBox2.Text = Val(TextBox1.Text) *
0.000000372506136111 & " hp/h "
Else
If ComboBox1.Text = "hp/h" And
ComboBox2.Text = "joule" Then
TextBox2.Text =
Val(TextBox1.Text) / 0.000000372506136111 & " joule "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "cal" And ComboBox2.Text = "cal" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " cal "
Else
If ComboBox1.Text = "cal" And ComboBox2.Text = "btu" Then
TextBox2.Text = Val(TextBox1.Text) * 0.00396567 & " btu "
Else
If ComboBox1.Text = "btu" And ComboBox2.Text = "cal" Then
TextBox2.Text = Val(TextBox1.Text) / 0.00396567 & " cal "
Else
If ComboBox1.Text = "cal" And ComboBox2.Text = "ft/lb" Then
TextBox2.Text = Val(TextBox1.Text) * 3.08596 & " ft/lb "
Else
If ComboBox1.Text = "ft/lb" And ComboBox2.Text = "cal" Then
TextBox2.Text = Val(TextBox1.Text) / 3.08596 & " cal "
Else
If ComboBox1.Text = "cal" And ComboBox2.Text = "ergios" Then
TextBox2.Text = Val(TextBox1.Text) * 41840000.0 & " ergios "
Else
If ComboBox1.Text = "ergios" And ComboBox2.Text = "cal" Then
TextBox2.Text = Val(TextBox1.Text) / 41840000.0 & " cal "
Else
If ComboBox1.Text = "cal" And ComboBox2.Text = "eV" Then
TextBox2.Text = Val(TextBox1.Text) * 2.611E+19 & " eV "
Else
If ComboBox1.Text = "eV" And ComboBox2.Text = "cal" Then
TextBox2.Text = Val(TextBox1.Text) / 2.611E+19 & " cal "
Else
If ComboBox1.Text = "cal" And ComboBox2.Text = "kcal" Then
TextBox2.Text = Val(TextBox1.Text) * 0.001 & " kcal "
Else
If ComboBox1.Text = "kcal" And ComboBox2.Text = "cal" Then
TextBox2.Text = Val(TextBox1.Text) / 0.001 & " cal "
Else
If ComboBox1.Text = "cal" And ComboBox2.Text = "MeV" Then
TextBox2.Text = Val(TextBox1.Text) * 26110000000000.0 & "
MeV "
Else
If ComboBox1.Text = "MeV" And ComboBox2.Text = "cal" Then
TextBox2.Text = Val(TextBox1.Text) / 26110000000000.0 &
" cal "
Else
If ComboBox1.Text = "cal" And ComboBox2.Text = "kw/h"
Then
TextBox2.Text = Val(TextBox1.Text) * 0.0000011622 &
" kw/h "
Else
If ComboBox1.Text = "kw/h" And ComboBox2.Text =
"cal" Then
TextBox2.Text = Val(TextBox1.Text) /
0.0000011622 & " cal "
Else
If ComboBox1.Text = "cal" And ComboBox2.Text =
"hp/h" Then
TextBox2.Text = Val(TextBox1.Text) *
0.0000015596 & " hp/h "
Else

VISUAL BASIC STUDIO P á g i n a 56 | 62


If ComboBox1.Text = "hp/h" And
ComboBox2.Text = "cal" Then
TextBox2.Text = Val(TextBox1.Text) /
0.0000015596 & " cal "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "btu" And ComboBox2.Text = "btu" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " btu "
Else
If ComboBox1.Text = "btu" And ComboBox2.Text = "ft/lb" Then
TextBox2.Text = Val(TextBox1.Text) * 778.169 & " ft/lb "
Else
If ComboBox1.Text = "ft/lb" And ComboBox2.Text = "btu" Then
TextBox2.Text = Val(TextBox1.Text) / 778.169 & " btu "
Else
If ComboBox1.Text = "btu" And ComboBox2.Text = "ergios" Then
TextBox2.Text = Val(TextBox1.Text) * 10550000000.0 & " ergios "
Else
If ComboBox1.Text = "ergios" And ComboBox2.Text = "btu" Then
TextBox2.Text = Val(TextBox1.Text) / 10550000000.0 & " btu "
Else
If ComboBox1.Text = "btu" And ComboBox2.Text = "eV" Then
TextBox2.Text = Val(TextBox1.Text) * 6.585E+21 & " eV "
Else
If ComboBox1.Text = "eV" And ComboBox2.Text = "btu" Then
TextBox2.Text = Val(TextBox1.Text) / 6.585E+21 & " btu "
Else
If ComboBox1.Text = "btu" And ComboBox2.Text = "kcal" Then
TextBox2.Text = Val(TextBox1.Text) * 0.252164 & " kcal "
Else
If ComboBox1.Text = "kcal" And ComboBox2.Text = "btu" Then
TextBox2.Text = Val(TextBox1.Text) / 0.252164 & " btu "
Else
If ComboBox1.Text = "btu" And ComboBox2.Text = "MeV" Then
TextBox2.Text = Val(TextBox1.Text) * 6.585E+15 & " MeV "
Else
If ComboBox1.Text = "MeV" And ComboBox2.Text = "btu" Then
TextBox2.Text = Val(TextBox1.Text) / 6.585E+15 & " btu "
Else
If ComboBox1.Text = "btu" And ComboBox2.Text = "kw/h" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000293 & " kw/h "
Else
If ComboBox1.Text = "kw/h" And ComboBox2.Text = "btu" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000293 & " btu "
Else
If ComboBox1.Text = "btu" And ComboBox2.Text = "hp/h"
Then
TextBox2.Text = Val(TextBox1.Text) * 0.0004 & " hp/h
"
Else
If ComboBox1.Text = "hp/h" And ComboBox2.Text =
"btu" Then
TextBox2.Text = Val(TextBox1.Text) / 0.0004 & "
btu "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "ft/lb" And ComboBox2.Text = "ft/lb" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " ft/lb "
Else
If ComboBox1.Text = "ft/lb" And ComboBox2.Text = "ergios" Then
TextBox2.Text = Val(TextBox1.Text) * 13560000.0 & " ergios "
Else
If ComboBox1.Text = "ergios" And ComboBox2.Text = "ft/lb" Then
TextBox2.Text = Val(TextBox1.Text) / 13560000.0 & " ft/lb "
Else
If ComboBox1.Text = "ft/lb" And ComboBox2.Text = "eV" Then
TextBox2.Text = Val(TextBox1.Text) * 8.462E+18 & " eV "
Else
If ComboBox1.Text = "eV" And ComboBox2.Text = "ft/lb" Then

VISUAL BASIC STUDIO P á g i n a 57 | 62


TextBox2.Text = Val(TextBox1.Text) / 8.462E+18 & " ft/lb "
Else
If ComboBox1.Text = "ft/lb" And ComboBox2.Text = "kcal" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000324 & " kcal "
Else
If ComboBox1.Text = "kcal" And ComboBox2.Text = "ft/lb" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000324 & " ft/lb "
Else
If ComboBox1.Text = "ft/lb" And ComboBox2.Text = "MeV" Then
TextBox2.Text = Val(TextBox1.Text) * 8462000000000.0 & " MeV "
Else
If ComboBox1.Text = "MeV" And ComboBox2.Text = "ft/lb" Then
TextBox2.Text = Val(TextBox1.Text) / 8462000000000.0 & " ft/lb "
Else
If ComboBox1.Text = "ft/lb" And ComboBox2.Text = "kw/h" Then
TextBox2.Text = Val(TextBox1.Text) * 0.00000037662 & " kw/h "
Else
If ComboBox1.Text = "kw/h" And ComboBox2.Text = "ft/lb" Then
TextBox2.Text = Val(TextBox1.Text) / 0.00000037662 & " ft/lb "
Else
If ComboBox1.Text = "ft/lb" And ComboBox2.Text = "hp/h" Then
TextBox2.Text = Val(TextBox1.Text) * 0.00000050485 & " hp/h
"
Else
If ComboBox1.Text = "hp/h" And ComboBox2.Text = "ft/lb" Then
TextBox2.Text = Val(TextBox1.Text) / 0.00000050485 & "
ft/lb "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "ergios" And ComboBox2.Text = "ergios" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " ergios "
Else
If ComboBox1.Text = "ergios" And ComboBox2.Text = "eV" Then
TextBox2.Text = Val(TextBox1.Text) * 624200000000.0 & " eV "
Else
If ComboBox1.Text = "eV" And ComboBox2.Text = "ergios" Then
TextBox2.Text = Val(TextBox1.Text) / 624200000000.0 & " ergios "
Else
If ComboBox1.Text = "ergios" And ComboBox2.Text = "kcal" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000000000023901 & " kcal "
Else
If ComboBox1.Text = "kcal" And ComboBox2.Text = "ergios" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000000000023901 & " ergios "
Else
If ComboBox1.Text = "ergios" And ComboBox2.Text = "MeV" Then
TextBox2.Text = Val(TextBox1.Text) * 624151 & " MeV "
Else
If ComboBox1.Text = "MeV" And ComboBox2.Text = "ergios" Then
TextBox2.Text = Val(TextBox1.Text) / 624151 & " ergios "
Else
If ComboBox1.Text = "ergios" And ComboBox2.Text = "kw/h" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000000000000027778 & " kw/h "
Else
If ComboBox1.Text = "kw/h" And ComboBox2.Text = "ergios" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000000000000027778 & " ergios "
Else
If ComboBox1.Text = "ergios" And ComboBox2.Text = "hp/h" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000000372506136111 & " hp/h "
Else
If ComboBox1.Text = "hp/h" And ComboBox2.Text = "ergios" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000000372506136111 & "
ergios "
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "eV" And ComboBox2.Text = "eV" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " eV "
Else
If ComboBox1.Text = "eV" And ComboBox2.Text = "kcal" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000000000023901 & " kcal "
Else
If ComboBox1.Text = "kcal" And ComboBox2.Text = "eV" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000000000023901 & " eV "
Else
If ComboBox1.Text = "eV" And ComboBox2.Text = "MeV" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000001 & " MeV "
Else
If ComboBox1.Text = "MeV" And ComboBox2.Text = "eV" Then

VISUAL BASIC STUDIO P á g i n a 58 | 62


TextBox2.Text = Val(TextBox1.Text) / 0.000001 & " eV "
Else
If ComboBox1.Text = "eV" And ComboBox2.Text = "kw/h" Then
TextBox2.Text = Val(TextBox1.Text) * 4.4505E-26 & " kw/h "
Else
If ComboBox1.Text = "kw/h" And ComboBox2.Text = "eV" Then
TextBox2.Text = Val(TextBox1.Text) / 4.4505E-26 & " eV "
Else
If ComboBox1.Text = "eV" And ComboBox2.Text = "hp/h" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000000372506136111 & " hp/h "
Else
If ComboBox1.Text = "hp/h" And ComboBox2.Text = "eV" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000000372506136111 & " eV "
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "kcal" And ComboBox2.Text = "kcal" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " kcal "
Else
If ComboBox1.Text = "kcal" And ComboBox2.Text = "MeV" Then
TextBox2.Text = Val(TextBox1.Text) * 2.611E+16 & " MeV "
Else
If ComboBox1.Text = "MeV" And ComboBox2.Text = "kcal" Then
TextBox2.Text = Val(TextBox1.Text) / 2.611E+16 & " kcal "
Else
If ComboBox1.Text = "kcal" And ComboBox2.Text = "kw/h" Then
TextBox2.Text = Val(TextBox1.Text) * 0.00116222 & " kw/h "
Else
If ComboBox1.Text = "kw/h" And ComboBox2.Text = "kcal" Then
TextBox2.Text = Val(TextBox1.Text) / 0.00116222 & " kcal "
Else
If ComboBox1.Text = "kcal" And ComboBox2.Text = "hp/h" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000000372506136111 & " hp/h "
Else
If ComboBox1.Text = "hp/h" And ComboBox2.Text = "kcal" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000000372506136111 & " kcal "
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "MeV" And ComboBox2.Text = "MeV" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " MeV "
Else
If ComboBox1.Text = "MeV" And ComboBox2.Text = "kw/h" Then
TextBox2.Text = Val(TextBox1.Text) * 4.4505E-20 & " kw/h "
Else
If ComboBox1.Text = "kw/h" And ComboBox2.Text = "MeV" Then
TextBox2.Text = Val(TextBox1.Text) / 4.4505E-20 & " MeV "
Else
If ComboBox1.Text = "MeV" And ComboBox2.Text = "hp/h" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000000372506136111 & " hp/h "
Else
If ComboBox1.Text = "hp/h" And ComboBox2.Text = "MeV" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000000372506136111 & " MeV "
End If
End If
End If
End If
End If

If ComboBox1.Text = "kw/h" And ComboBox2.Text = "kw/h" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " kw/h "
Else
If ComboBox1.Text = "kw/h" And ComboBox2.Text = "hp/h" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000000372506136111 & " hp/h "
Else
If ComboBox1.Text = "hp/h" And ComboBox2.Text = "kw/h" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000000372506136111 & " kw/h "
End If
End If
End If

If ComboBox1.Text = "hp/h" And ComboBox2.Text = "hp/h" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " hp/h "
End If
End If

VISUAL BASIC STUDIO P á g i n a 59 | 62


POTENCIA
If Poten.Text = "POTENCIA" Then
If ComboBox1.Text = "hp" And ComboBox2.Text = "hp" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " hp "
Else
If ComboBox1.Text = "hp" And ComboBox2.Text = "btu/h" Then
TextBox2.Text = Val(TextBox1.Text) * 2544.328396865 & " btu/h "
Else
If ComboBox1.Text = "btu/h" And ComboBox2.Text = "hp" Then
TextBox2.Text = Val(TextBox1.Text) / 2544.3283968651 & " hp "
Else
If ComboBox1.Text = "hp" And ComboBox2.Text = "ft*lb/s" Then
TextBox2.Text = Val(TextBox1.Text) * 550.0000365393 & " ft*lb/s "
Else
If ComboBox1.Text = "ft*lb/s" And ComboBox2.Text = "hp" Then
TextBox2.Text = Val(TextBox1.Text) / 550.0000365393 & " hp "
Else
If ComboBox1.Text = "hp" And ComboBox2.Text = "watts" Then
TextBox2.Text = Val(TextBox1.Text) * 745.7 & " watts "
Else
If ComboBox1.Text = "watts" And ComboBox2.Text = "hp" Then
TextBox2.Text = Val(TextBox1.Text) / 745.7 & " hp "
Else
If ComboBox1.Text = "hp" And ComboBox2.Text = "kcal/s" Then
TextBox2.Text = Val(TextBox1.Text) * 0.00178226547 & " kcal/s "
Else
If ComboBox1.Text = "kcal/s" And ComboBox2.Text = "hp" Then
TextBox2.Text = Val(TextBox1.Text) / 0.00178226547 & " hp "
End If
End If
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "btu/h" And ComboBox2.Text = "btu/h" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " btu/h "
Else
If ComboBox1.Text = "btu/h" And ComboBox2.Text = "ft*lb/s" Then
TextBox2.Text = Val(TextBox1.Text) * 0.216 & " ft*lb/s "
Else
If ComboBox1.Text = "ft*lb/s" And ComboBox2.Text = "btu/h" Then
TextBox2.Text = Val(TextBox1.Text) / 0.216 & " btu/h "
Else
If ComboBox1.Text = "btu/h" And ComboBox2.Text = "watts" Then
TextBox2.Text = Val(TextBox1.Text) * 0.2929 & " watts "
Else
If ComboBox1.Text = "watts" And ComboBox2.Text = "btu/h" Then
TextBox2.Text = Val(TextBox1.Text) / 0.2929 & " btu/h "
Else
If ComboBox1.Text = "btu/h" And ComboBox2.Text = "kcal/s" Then
TextBox2.Text = Val(TextBox1.Text) * 14276.401 & " kcal/s "
Else
If ComboBox1.Text = "kcal/s" And ComboBox2.Text = "btu/h" Then
TextBox2.Text = Val(TextBox1.Text) / 14276.401 & " btu/h "
End If
End If
End If
End If
End If
End If
End If

If ComboBox1.Text = "ft*lb/s" And ComboBox2.Text = "ft*lb/s" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " ft*lb/s "
Else
If ComboBox1.Text = "ft*lb/s" And ComboBox2.Text = "watts" Then
TextBox2.Text = Val(TextBox1.Text) * 1.3558 & " watts "
Else
If ComboBox1.Text = "watts" And ComboBox2.Text = "ft*lb/s" Then
TextBox2.Text = Val(TextBox1.Text) / 1.3558 & " ft*lb/s "
Else
If ComboBox1.Text = "ft*lb/s" And ComboBox2.Text = "kcal/s" Then
TextBox2.Text = Val(TextBox1.Text) * 0.000324 & " kcal/s "
Else
If ComboBox1.Text = "kcal/s" And ComboBox2.Text = "ft*lb/s" Then
TextBox2.Text = Val(TextBox1.Text) / 0.000324 & " ft*lb/s "
End If
End If
End If
End If
End If

If ComboBox1.Text = "watts" And ComboBox2.Text = "watts" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " watts "
Else
If ComboBox1.Text = "watts" And ComboBox2.Text = "kcal/s" Then
TextBox2.Text = Val(TextBox1.Text) * 0.00000239005736 & " kcal/s "
Else
If ComboBox1.Text = "kcal/s" And ComboBox2.Text = "watts" Then

VISUAL BASIC STUDIO P á g i n a 60 | 62


TextBox2.Text = Val(TextBox1.Text) / 0.00000239005736 & " watts "
End If
End If
End If

If ComboBox1.Text = "kcal/s" And ComboBox2.Text = "kcal/s" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " kcal/s "
End If
End If

CARGA ELÉCTRICA
If Carg.Text = "CARGA ELECTRICA" Then
If ComboBox1.Text = "faraday" And ComboBox2.Text = "faraday" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " faraday "
Else
If ComboBox1.Text = "faraday" And ComboBox2.Text = "coulombs" Then
TextBox2.Text = Val(TextBox1.Text) * 0.00001036 & " coulombs "
Else
If ComboBox1.Text = "coulombs" And ComboBox2.Text = "faraday" Then
TextBox2.Text = Val(TextBox1.Text) / 0.00001036 & " faraday "
Else
If ComboBox1.Text = "faraday" And ComboBox2.Text = "carga electron" Then
TextBox2.Text = Val(TextBox1.Text) * 6.0221417309E+23 & " carga electron "
Else
If ComboBox1.Text = "carga electron" And ComboBox2.Text = "faraday" Then
TextBox2.Text = Val(TextBox1.Text) / 6.0221417309E+23 & " faraday "
End If
End If
End If
End If
End If

If ComboBox1.Text = "coulombs" And ComboBox2.Text = "coulombs" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " coulombs "
Else
If ComboBox1.Text = "coulombs" And ComboBox2.Text = "carga electron" Then
TextBox2.Text = Val(TextBox1.Text) * 6241509750 & " carga electron "
Else
If ComboBox1.Text = "carga electron" And ComboBox2.Text = "coulombs" Then
TextBox2.Text = Val(TextBox1.Text) / 6241509750 & " coulombs "
End If
End If
End If

If ComboBox1.Text = "carga electron" And ComboBox2.Text = "carga electron" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " carga electron "
End If
End If

FLUJO MAGNÉTICO
If Fluj.Text = "FLUJO MAGNETICO" Then
If ComboBox1.Text = "weber" And ComboBox2.Text = "weber" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " weber "
Else
If ComboBox1.Text = "weber" And ComboBox2.Text = "maxwells" Then
TextBox2.Text = Val(TextBox1.Text) * 100000000.0 & " maxwells "
Else
If ComboBox1.Text = "maxwells" And ComboBox2.Text = "weber" Then
TextBox2.Text = Val(TextBox1.Text) / 100000000.0 & " weber "
End If
End If
End If

If ComboBox1.Text = "maxwells" And ComboBox2.Text = "maxwells" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " maxwells "
End If
End If

VISUAL BASIC STUDIO P á g i n a 61 | 62


INTENSIDAD MAGNÉTICA
If Inten.Text = "INTENSIDAD MAGNETICA" Then
If ComboBox1.Text = "tesla" And ComboBox2.Text = "tesla" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " tesla "
Else
If ComboBox1.Text = "tesla" And ComboBox2.Text = "newton/amp*m" Then
TextBox2.Text = Val(TextBox1.Text) * 100000.0 & " newton/amp*m "
Else
If ComboBox1.Text = "newton/amp*m" And ComboBox2.Text = "tesla" Then
TextBox2.Text = Val(TextBox1.Text) / 100000.0 & " tesla "
Else
If ComboBox1.Text = "tesla" And ComboBox2.Text = "weber/m^2" Then
TextBox2.Text = Val(TextBox1.Text) * 1.0 & " weber/m^2 "
Else
If ComboBox1.Text = "weber/m^2" And ComboBox2.Text = "tesla" Then
TextBox2.Text = Val(TextBox1.Text) / 1.0 & " tesla "
Else
If ComboBox1.Text = "tesla" And ComboBox2.Text = "gauss" Then
TextBox2.Text = Val(TextBox1.Text) * 10000 & " gauss "
Else
If ComboBox1.Text = "gauss" And ComboBox2.Text = "tesla" Then
TextBox2.Text = Val(TextBox1.Text) / 10000 & " tesla "
End If
End If
End If
End If
End If
End If
End IfIf ComboBox1.Text = "newton/amp*m" And ComboBox2.Text = "newton/amp*m" Then
TextBox2.Text = Val(TextBox1.Text) * 1 & " newton/amp*m "
Else
If ComboBox1.Text = "newton/amp*m" And ComboBox2.Text = "weber/m^2" Then
TextBox2.Text = Val(TextBox1.Text) * 1000000.0 & " weber/m^2 "
Else
If ComboBox1.Text = "weber/m^2" And ComboBox2.Text = "newton/amp*m" Then
TextBox2.Text = Val(TextBox1.Text) / 1000000.0 & " newton/amp*m "
Else
If ComboBox1.Text = "newton/amp*m" And ComboBox2.Text = "gauss" Then
TextBox2.Text = Val(TextBox1.Text) * 10000 & " gauss "
Else
If ComboBox1.Text = "gauss" And ComboBox2.Text = "newton/amp*m" Then
TextBox2.Text = Val(TextBox1.Text) / 10000 & " newton/amp*m "
End If
End If
End If
End If
End If

If ComboBox1.Text = "weber/m^2" And ComboBox2.Text = "weber/m^2" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " weber/m^2 "
Else
If ComboBox1.Text = "weber/m^2" And ComboBox2.Text = "gauss" Then
TextBox2.Text = Val(TextBox1.Text) * 10000.0 & " gauss "
Else
If ComboBox1.Text = "gauss" And ComboBox2.Text = "weber/m^2" Then
TextBox2.Text = Val(TextBox1.Text) / 10000.0 & " weber/m^2 "
End If
End If
End If

If ComboBox1.Text = "gauss" And ComboBox2.Text = "gauss" Then


TextBox2.Text = Val(TextBox1.Text) * 1 & " gauss "
End If
End If

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


Button2.Click

TextBox1.Text = ""
TextBox2.Text = ""
ComboBox1.Text = ""
ComboBox2.Text = ""

End Sub
End Class

VISUAL BASIC STUDIO P á g i n a 62 | 62

You might also like