Ficha ->7
Parte Gráfica
Código
Public Class Form1
Private Sub Label8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label8.Click
End Sub
Private Sub TextBox9_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox9.TextChanged
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox9.Text = (Val(TextBox6.Text) + Val(TextBox7.Text) + Val(TextBox8.Text))
TextBox14.Text = (Val(TextBox15.Text) + Val(TextBox16.Text) + Val(TextBox17.Text))
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Dim x As Integer
x = MsgBox("Quer mesmo sair?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Exames")
If x = vbYes Then
Close()
End If
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox7.Text = ""
TextBox8.Text = ""
TextBox9.Text = ""
TextBox10.Text = ""
TextBox11.Text = ""
TextBox12.Text = ""
TextBox13.Text = ""
TextBox14.Text = ""
TextBox15.Text = ""
TextBox16.Text = ""
TextBox17.Text = ""
TextBox6.Focus()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Dim maior, maior1 As Integer
maior = Val(TextBox6.Text)
If Val(TextBox7.Text) > maior Then
maior = Val(TextBox7.Text)
End If
If Val(TextBox8.Text) > maior Then
maior = Val(TextBox8.Text)
End If
TextBox10.Text = maior
maior1 = Val(TextBox17.Text)
If Val(TextBox16.Text) > maior1 Then
maior1 = Val(TextBox16.Text)
End If
If Val(TextBox15.Text) > maior1 Then
maior1 = Val(TextBox15.Text)
End If
TextBox13.Text = maior1
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim menor, menor1 As Integer
menor = Val(TextBox6.Text)
If Val(TextBox7.Text) < menor Then
menor = Val(TextBox7.Text)
End If
If Val(TextBox8.Text) < menor Then
menor = Val(TextBox8.Text)
End If
TextBox11.Text = menor
menor1 = Val(TextBox17.Text)
If Val(TextBox16.Text) < menor1 Then
menor1 = Val(TextBox16.Text)
End If
If Val(TextBox15.Text) < menor1 Then
menor1 = Val(TextBox15.Text)
End If
TextBox12.Text = menor1
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
If TextBox9.Text >= 10 Then
Label17.Text = "Aprovado"
Else
Label17.Text = "Reprovado"
End If
If TextBox14.Text >= 10 Then
Label18.Text = "Aprovado"
Else
Label18.Text = "Reprovado"
End If
If TextBox9.Text >= 10 And TextBox11.Text >= 10 Then
MsgBox("Parabéns!!! Está aprovado.", MsgBoxStyle.Exclamation + MsgBoxStyle.OkOnly, "Exames")
End If
End Sub
End Class