Organizacion De Computadoras
Crea un nuevo proyecto
En la clase persona agregamos lo siguientes:
Public Nombre As String
Public Apellidos As String
Public Telefono As String
Public SubsetPersona(Nom As String, Apell As String, Telf As String)
Nombre = Nom
Apellidos = Apell
Telefono = Telf
En el formulario hacemos un button y agregamos el siguiente codigoel siguientes código;
Dim P As Persona
Dim A As Persona
P = New Persona
A = New Persona
P.Nombre = "ana”
P.Apellidos = "devis rojas"P.Telefono = "87123456"
P.setPersona("ana", "roja", "899559")
MsgBox(P.Nombre)
MsgBox(P.Apellidos)
MsgBox(P.Telefono)A.setPersona("Ke", "Amador", "865472")
MsgBox(A.Nombre)
MsgBox(P.Apellidos)
MsgBox(P.Telefono)
-------------------------------------------------
Private SubButton3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
Me.Close()
End Sub
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) HandlesButton1.Click
Dim nombre, apellidos, turno As String
Dim edad As Byte
If txtNombre.Text.Trim = "" Then
MessageBox.Show("Ingrese el Nombre")txtNombre.Focus()
If txtApellidos.Text.Trim = "" Then
MessageBox.Show("Ingrese los Apellidos")
End If
If rbMañana.Checked = False And rbTarde.Checked = FalseAnd rbNoche.Checked = False Then
MessageBox.Show("Seleccione el Turno")
End If
'Cambiar a Mayuscula'
nombre = txtNombre.Text.ToUpper()Apellidos = txtApellidos.Text.ToUpper()
edad = NumEdad.Value
End If
If
rbMañana.Checked = True
turno = "Mañana"
ElseIf...
Regístrate para leer el documento completo.