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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

On Error GoTo DRIVE_ERROR<br />

Dir<strong>1.</strong>Path = Drive<strong>1.</strong>Drive<br />

Exit Sub<br />

DRIVE_ERROR:<br />

End Sub<br />

MsgBox “ERROR: Unidad no preparada”, vbCritical, “Error”<br />

Exit Sub<br />

Private Sub Dir1_Change()<br />

End Sub<br />

File<strong>1.</strong>Path = Dir<strong>1.</strong>Path<br />

Private Sub File1_Click()<br />

End Sub<br />

Dim ARCHIVO As String<br />

ARCHIVO = File<strong>1.</strong>Path & “\”<br />

ARCHIVO = ARCHIVO & File<strong>1.</strong>List(File<strong>1.</strong>ListIndex)<br />

ImgVista.Picture = LoadPicture(ARCHIVO)<br />

La instrucción On Error activa una rutina de control de<br />

errores y especifica la ubicación de la misma en un<br />

procedimiento.<br />

LA FUNCIÓN MSGBOX<br />

A menudo habrá situaciones en las cuales tendrá que<br />

presentar algún mensaje (por ejemplo una pregunta) y en función<br />

Pág. 93

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

Saved successfully!

Ooh no, something went wrong!