Programa do Hospital
Parte Gráfica
Parte do Código
Public Class form1
Dim r1 As New medico
Dim r2 As New assistente
Dim r3 As New pessoalauxiliar
Dim r4 As New limpeza
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
r1.nomep = InputBox("Introduza o nome do médico")
r1.idadep = InputBox("idade")
r1.moradap = InputBox("morada")
r1.telemp = InputBox("telemóvel")
r1.especilidadep = InputBox("especialidade")
r1.bip = InputBox("CARTAO DE CIDADAO")
r1.turnop = InputBox("Turno")
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
r2.nomep = InputBox("Introduza o nome do médico")
r2.idadep = InputBox("idade")
r2.moradap = InputBox("morada")
r2.telemp = InputBox("telemóvel")
r2.tipop = InputBox("tipo")
r2.bip = InputBox("CARTAO DE CIDADAO")
r2.turnop = InputBox("Turno")
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
r3.nomep = InputBox("Introduza o nome do médico")
r3.idadep = InputBox("idade")
r3.moradap = InputBox("morada")
r3.telemp = InputBox("telemóvel")
r3.especilidadep = InputBox("especialidade")
r3.bip = InputBox("CARTAO DE CIDADAO")
r3.turnop = InputBox("Turno")
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
r4.nomep = InputBox("Introduza o nome do médico")
r4.idadep = InputBox("idade")
r4.moradap = InputBox("morada")
r4.telemp = InputBox("telemóvel")
r4.tipop = InputBox("especialidade")
r4.bip = InputBox("CARTAO DE CIDADAO")
r4.seccaop = InputBox("Turno")
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
Label2.Text = ("nome:" & r1.nomep)
Label3.Text = ("idade:" & r1.idadep)
Label4.Text = r1.moradap
Label5.Text = r1.telemp
Label6.Text = r1.bip
Label7.Text = r1.especilidadep
Label8.Text = r1.turnop
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
Label2.Text = r2.nomep
Label3.Text = r2.idadep
Label4.Text = r2.moradap
Label5.Text = r2.telemp
Label6.Text = r2.bip
Label7.Text = r2.tipop
Label8.Text = r2.turnop
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
Label2.Text = r3.nomep
Label3.Text = r3.idadep
Label4.Text = r3.moradap
Label5.Text = r3.telemp
Label6.Text = r3.bip
Label7.Text = r3.especilidadep
Label8.Text = r3.turnop
End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
Label2.Text = r4.nomep
Label3.Text = r4.idadep
Label4.Text = r4.moradap
Label5.Text = r4.telemp()
Label6.Text = r4.bip
Label7.Text = r4.tipop
Label8.Text = r4.seccaop
End Sub
Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
Dim y As Integer
y = MsgBox("deseja mesmo sair", MsgBoxStyle.YesNo)
If y = vbYes Then
Close()
End If
End Sub
Private Sub form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
End Sub
End Class
Reflexão: Este é um programa(Hospital) que faz a inscrição de uma fixa e pede o nome, a idade entra varias coisas.Eu escolhi este programa porque tem class derivadas e acho que é um bom exemplo para colocar no e-portefólio.