ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Calificacion con inputbox


Enviado por   •  27 de Agosto de 2017  •  Trabajos  •  491 Palabras (2 Páginas)  •  206 Visitas

Página 1 de 2

        [pic 1][pic 2]

PROGRAMACION 1

PRÁCTICA # 2

PROFESOR: Héctor Francisco Berrones

ALUMNO: Edson Luis Rocha Rdz

MATRICULA: 1863555

GRUPO: 3L1   SALON: 131

TURNO: Matutino

Monterrey, N.L, 18 de agosto de 2017

Practica 2. Elaborar un programa donde capture a través de un InputBox los datos de un alumno como lo son matricula. Nombre, grupo y el promedio de tres calificaciones , estos datos se mostraran en sus correspondientes Textbox, se deberá calcular el promedio y mediando un msgbox mostrar si el alumno aprobó o reprobó la unidad de aprendizaje

Interfaz gráfica.

[pic 3]

Codificación

Public Class frmprom

    Private Sub btnprom_Click(sender As Object, e As EventArgs) Handles btnprom.Click

        Dim cal1, cal2, cal3, prom As Integer

        txtmatricula.Text = InputBox("ingrese su matrícula")

        txtnombre.Text = InputBox("ingrese su nombre")

        txtgrupo.Text = InputBox("ingrese su grupo")

        txtcal1.Text = InputBox("ingrese su calificacion")

        txtcal2.Text = InputBox("ingrese su segunda calificacion")

        txtcal3.Text = InputBox("ingrese su tercera calificacion")

        cal1 = Val(txtcal1.Text)

        cal2 = Val(txtcal2.Text)

        cal3 = Val(txtcal3.Text)

        prom = (Val(txtcal1.Text) + Val(txtcal2.Text) + Val(txtcal3.Text)) / 3

        txtpromedio.Text = prom

        If prom > 70 Then

            MessageBox.Show("Aprobado","calificación",MessageBoxButtons.OK, MessageBoxIcon.Asterisk)

        Else

            MessageBox.Show("Reprobado","calificación",MessageBoxButtons.OK, MessageBoxIcon.Warning)

        End If

    End Sub

    Private Sub btnlimp_Click(sender As Object, e As EventArgs) Handles btnlimpiar.Click

        txtcal1.Clear()

        txtcal2.Clear()

        txtcal3.Clear()

        txtpromedio.Clear()

        txtmatricula.Clear()

        txtnombre.Clear()

        txtpromedio.Clear()

    End Sub

    Private Sub btnsalir_Click(sender As Object, e As EventArgs) Handles btnsalir.Click

        End

    End Sub

End Class

Tabla de propiedades

Objeto

propiedad

Valor

Label 1

Name

Text

Lblmatricula

Matricula

Label 2

Name

Text

Lblnmombre

Nombre del alumno

Label 3

Name

Text

Lblgrupo

Grupo

Label 4

Name

Text

Lblcal1

Calificación 1

Label 5

Name

Text

Lblcal2

Calificación 2

Label 6

Name

Text

Lblcal3

Calificación 3

Label 7

Name

Text

Lblprom

Promedio

Textbox 1

Name

Txtmatricula

Textbox 2

Name

Txtnombre

Textbox 3

Name

Txtgrupo

Textbox 4

Name

Txtcal1

Textbox 5

Name

Txtcal2

Textbox 6

Name

Txtcal3

Textbox 7

Name

txtpromedio

Button 1

Name

Text

Btnprom

Promedio

Button 2

Name

Text

Btnlimpiar

Limpiar

Button 3

Name

Text

Btnsalir

Salir

...

Descargar como (para miembros actualizados)  txt (3 Kb)   pdf (528.5 Kb)   docx (339.2 Kb)  
Leer 1 página más »
Disponible sólo en Clubensayos.com