SlideShare una empresa de Scribd logo
1 de 3
Índice De masa Corporal
Formulario Principal
Ahora ingresaremos un peso (KG) y talla (M) será:
Ahora mostraremos el código en visual basic:
Public Class Form1
Dim Imc As Double
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Imc = Val(Peso.Text) / (Val(Altura.Text) * Val(Altura.Text))
Label3.Text = Format(Imc, "##.##")
Label3.Visible = True
Button2.Enabled = True
Select Case Imc
Case Is < 17
Label4.Text = "Delgadez severa."
Label4.Visible = True
Case 17 To 18.49
Label4.Text = "Delgadez aceptable."
Label4.Visible = True
Case 18.5 To 24.99
Label4.Text = "Peso normal."
Label4.Visible = True
Case 25 To 29.99
Label4.Text = "Sobrepeso."
Label4.Visible = True
Case 30 To 34.99
Label4.Text = "Obeso: Tipo I."
Label4.Visible = True
Case 35 To 39.99
Label4.Text = "Obeso: Tipo II."
Label4.Visible = True
Case 40 To 60
Label4.Text = "Obeso: Tipo III."
Label4.Visible = True
End Select
End Sub
Private Sub TextBox1_KeyPress(ByVal KeyAscii As Integer)
If KeyAscii = Asc(vbCr) Then
If Val(Peso.Text) < 40 Or Val(Altura.Text) > 200 Then
MsgBox("Valor de PESO erróneo. Será corregido.")
Peso.Text = 60
End If
End If
End Sub
Private Sub TextBox1_LostFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Peso.LostFocus
TextBox1_KeyPress(Asc(vbCr))
End Sub
Private Sub TextBox2_KeyPress(ByVal KeyAscii As Integer)
If KeyAscii = Asc(vbCr) Then
If Val(Altura.Text) < 1.4 Or Val(Altura.Text) > 2.1 Then
MsgBox("Valor de la TALLA errónea. Será corregida.")
Altura.Text = 1.65
End If
End If
End Sub
Private Sub TextBox2_LostFocus(ByVal sender As Object, ByVal e As
System.EventArgs) Handles Altura.LostFocus
TextBox2_KeyPress(Asc(vbCr))
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
Peso.Text = ""
Altura.Text = ""
Label3.Visible = False
Label4.Visible = False
Peso.Focus()
Button2.Enabled = False
End Sub
End Class

Más contenido relacionado

Más de Jhon Silva Penekita

Examen resuelto de II unidad de computación
Examen resuelto de II unidad de computaciónExamen resuelto de II unidad de computación
Examen resuelto de II unidad de computaciónJhon Silva Penekita
 
Solución de valuación de tercero y cuarto de secundaria
Solución de valuación de tercero y cuarto de secundariaSolución de valuación de tercero y cuarto de secundaria
Solución de valuación de tercero y cuarto de secundariaJhon Silva Penekita
 
Examen mensual de computación de primer grado de secundaria
Examen mensual de computación de primer grado de secundariaExamen mensual de computación de primer grado de secundaria
Examen mensual de computación de primer grado de secundariaJhon Silva Penekita
 
Evaluación de tercero y cuarto de secundaria
Evaluación de tercero y cuarto de secundariaEvaluación de tercero y cuarto de secundaria
Evaluación de tercero y cuarto de secundariaJhon Silva Penekita
 
Creación de carpeta en windows 7 para tercero y cuarto de secundaria
Creación de carpeta en windows 7 para tercero y cuarto de secundariaCreación de carpeta en windows 7 para tercero y cuarto de secundaria
Creación de carpeta en windows 7 para tercero y cuarto de secundariaJhon Silva Penekita
 
Creación de carpeta en windows 7 para tercero y cuarto de secundaria
Creación de carpeta en windows 7 para tercero y cuarto de secundariaCreación de carpeta en windows 7 para tercero y cuarto de secundaria
Creación de carpeta en windows 7 para tercero y cuarto de secundariaJhon Silva Penekita
 
Clase 4 para primero y segundo de secundaria.
Clase 4 para primero y segundo de secundaria.Clase 4 para primero y segundo de secundaria.
Clase 4 para primero y segundo de secundaria.Jhon Silva Penekita
 

Más de Jhon Silva Penekita (20)

Criterio de búsqueda
Criterio de búsquedaCriterio de búsqueda
Criterio de búsqueda
 
Examen resuelto de II unidad de computación
Examen resuelto de II unidad de computaciónExamen resuelto de II unidad de computación
Examen resuelto de II unidad de computación
 
Solución de valuación de tercero y cuarto de secundaria
Solución de valuación de tercero y cuarto de secundariaSolución de valuación de tercero y cuarto de secundaria
Solución de valuación de tercero y cuarto de secundaria
 
Examen mensual de computación de primer grado de secundaria
Examen mensual de computación de primer grado de secundariaExamen mensual de computación de primer grado de secundaria
Examen mensual de computación de primer grado de secundaria
 
Evaluación de tercero y cuarto de secundaria
Evaluación de tercero y cuarto de secundariaEvaluación de tercero y cuarto de secundaria
Evaluación de tercero y cuarto de secundaria
 
Creación de carpeta en windows 7 para tercero y cuarto de secundaria
Creación de carpeta en windows 7 para tercero y cuarto de secundariaCreación de carpeta en windows 7 para tercero y cuarto de secundaria
Creación de carpeta en windows 7 para tercero y cuarto de secundaria
 
Creacion de carpeta
Creacion de carpetaCreacion de carpeta
Creacion de carpeta
 
Creación de carpeta en windows 7 para tercero y cuarto de secundaria
Creación de carpeta en windows 7 para tercero y cuarto de secundariaCreación de carpeta en windows 7 para tercero y cuarto de secundaria
Creación de carpeta en windows 7 para tercero y cuarto de secundaria
 
Clase 4 para primero y segundo de secundaria.
Clase 4 para primero y segundo de secundaria.Clase 4 para primero y segundo de secundaria.
Clase 4 para primero y segundo de secundaria.
 
Introducción
IntroducciónIntroducción
Introducción
 
Marcell
MarcellMarcell
Marcell
 
Edad media
Edad mediaEdad media
Edad media
 
Cmd o dos
Cmd o dosCmd o dos
Cmd o dos
 
Semana 1
Semana 1Semana 1
Semana 1
 
Evaluación
EvaluaciónEvaluación
Evaluación
 
clase 3
clase 3clase 3
clase 3
 
clase 1 y dos
clase 1 y dosclase 1 y dos
clase 1 y dos
 
Jacinto
JacintoJacinto
Jacinto
 
clases de computacion teoría
clases de computacion teoríaclases de computacion teoría
clases de computacion teoría
 
La adolescencia
La   adolescenciaLa   adolescencia
La adolescencia
 

Último

Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 

Último (20)

Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 

índice De masa corporal

  • 1. Índice De masa Corporal Formulario Principal Ahora ingresaremos un peso (KG) y talla (M) será:
  • 2. Ahora mostraremos el código en visual basic: Public Class Form1 Dim Imc As Double Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Imc = Val(Peso.Text) / (Val(Altura.Text) * Val(Altura.Text)) Label3.Text = Format(Imc, "##.##") Label3.Visible = True Button2.Enabled = True Select Case Imc Case Is < 17 Label4.Text = "Delgadez severa." Label4.Visible = True Case 17 To 18.49 Label4.Text = "Delgadez aceptable." Label4.Visible = True Case 18.5 To 24.99 Label4.Text = "Peso normal." Label4.Visible = True Case 25 To 29.99 Label4.Text = "Sobrepeso." Label4.Visible = True Case 30 To 34.99 Label4.Text = "Obeso: Tipo I." Label4.Visible = True Case 35 To 39.99 Label4.Text = "Obeso: Tipo II." Label4.Visible = True Case 40 To 60 Label4.Text = "Obeso: Tipo III." Label4.Visible = True End Select End Sub Private Sub TextBox1_KeyPress(ByVal KeyAscii As Integer) If KeyAscii = Asc(vbCr) Then If Val(Peso.Text) < 40 Or Val(Altura.Text) > 200 Then MsgBox("Valor de PESO erróneo. Será corregido.") Peso.Text = 60 End If End If End Sub Private Sub TextBox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Peso.LostFocus TextBox1_KeyPress(Asc(vbCr)) End Sub
  • 3. Private Sub TextBox2_KeyPress(ByVal KeyAscii As Integer) If KeyAscii = Asc(vbCr) Then If Val(Altura.Text) < 1.4 Or Val(Altura.Text) > 2.1 Then MsgBox("Valor de la TALLA errónea. Será corregida.") Altura.Text = 1.65 End If End If End Sub Private Sub TextBox2_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Altura.LostFocus TextBox2_KeyPress(Asc(vbCr)) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Peso.Text = "" Altura.Text = "" Label3.Visible = False Label4.Visible = False Peso.Focus() Button2.Enabled = False End Sub End Class