30.04.2013 Views

1. Visual Basic - Curso completo teoria y practica

1. Visual Basic - Curso completo teoria y practica

1. Visual Basic - Curso completo teoria y practica

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

End Sub<br />

TxtVacantes.Locked = Not Ok<br />

TxtProfesor.Locked = Not Ok<br />

CmdNuevo.Enabled = Not Ok<br />

CmdEditar.Enabled = Not Ok<br />

CmdGuardar.Enabled = Ok<br />

CmdEliminar.Enabled = Not Ok<br />

CmdPrimero.SetFocus<br />

If Ok Then TxtCodigo.SetFocus<br />

Private Sub ABRIR_ARCHIVO()<br />

On Error GoTo ERROR_ABRIR:<br />

N1 = FreeFile()<br />

Open “C:\DATA\CURSO.DAT” For Random As # N1 Len = Len(REG)<br />

SALIR_ABRIR:<br />

Exit Sub<br />

ERROR_ABRIR:<br />

End Sub<br />

MsgBox Err.Description<br />

Resume SALIR_ABRIR:<br />

Private Sub Form_Load()<br />

Call ABRIR_ARCHIVO<br />

End Sub<br />

Private Sub Form_Activate()<br />

MODO_EDITAR False<br />

Call CmdPrimero_Click<br />

Pág. 181

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

Saved successfully!

Ooh no, something went wrong!