Advertisement
jsbsan

dialogGambas

Apr 6th, 2014
1,347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
GAMBAS 0.47 KB | None | 0 0
  1. Public sub seleccionaArchivo() as string
  2. Dim fichero as string
  3.  
  4. Dialog.Title = "Elige archivo"
  5. Dialog.Filter = ["*.txt;*.dat", "Fichero de Texto", "*", "Todos los archivos"]
  6. Dialog.Path = user.home 'abre el directorio del usuario
  7. IF Dialog.OpenFile() THEN
  8.     RETURN "no ha seleccionado nada" ' el usuario apretó el botón de cancenlar
  9. ELSE
  10.     fichero=dialog.path 'fichero: variable que le asignamos la ruta y el nombre del archivo seleccionado
  11.     RETURN fichero
  12. ENDIF
  13.  
  14. END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement