1. Visual Basic - Curso completo teoria y practica

1. Visual Basic - Curso completo teoria y practica 1. Visual Basic - Curso completo teoria y practica

sanjudas.edu.do
from sanjudas.edu.do More from this publisher
30.04.2013 Views

TxtCurCodigo.SelStart = 0 TxtCurCodigo.SelLength = Len(TxtCurCodigo) Exit Sub End If TxtCurNombre = Rs!CurNombre TxtCurVacantes = Rs!CurVacantes TxtCurProfe = Rs!CurProfe Rs.Close Set Rs = Nothing TxtCurCodigo.Enabled = False CmdAceptar.Enabled = False CmdGrabar.Enabled = True CmdNuevo.Enabled = True End Sub Private Sub CmdGrabar_Click() End Sub Cn.Execute “Update Curso Set CurNombre = '” & _ TxtCurNombre & “',” & “CurVacantes = ” & _ Val(TxtCurVacantes) & “,” & “CurProfe = '” & _ TxtCurProfe & “'” & “ Where CurCodigo = '” & _ TxtCurCodigo & “'” Private Sub CmdNuevo_Click() TxtCurCodigo = “” TxtCurNombre = “” TxtCurVacantes = “” TxtCurProfe = “” CmdAceptar.Enabled = True CmdGrabar.Enabled = False CmdNuevo.Enabled = False TxtCurCodigo.Enabled = True TxtCurCodigo.SetFocus Pág. 340

End Sub Private Sub CmdCerrar_Click() Unload Me End Sub Para desarrollar la opción Eliminar de la tabla Cursos, añada un nuevo formulario al proyecto. Luego, ubique los siguientes controles en el formulario: 1 marco 4 etiquetas 4 cajas de texto 4 botones de comando En seguida proceda a establecer las propiedades según se indica: Form1 Frame1 Label1 Label2 Nombre FrmMantenCursos Caption Eliminar curso BorderStyle 3-Fixed Dialog MDIChild True Nombre FraCodigo Caption Nombre LblCodigo Caption Código: Nombre LblNombre Pág. 341

End Sub<br />

Private Sub CmdCerrar_Click()<br />

Unload Me<br />

End Sub<br />

Para desarrollar la opción Eliminar de la tabla <strong>Curso</strong>s,<br />

añada un nuevo formulario al proyecto. Luego, ubique los<br />

siguientes controles en el formulario:<br />

1 marco<br />

4 etiquetas<br />

4 cajas de texto<br />

4 botones de comando<br />

En seguida proceda a establecer las propiedades según se<br />

indica:<br />

Form1<br />

Frame1<br />

Label1<br />

Label2<br />

Nombre FrmManten<strong>Curso</strong>s<br />

Caption Eliminar curso<br />

BorderStyle 3-Fixed Dialog<br />

MDIChild True<br />

Nombre FraCodigo<br />

Caption<br />

Nombre LblCodigo<br />

Caption Código:<br />

Nombre LblNombre<br />

Pág. 341

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!