FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Buscar | Temas de Hoy | Marcar Foros Como Leídos |
|
Herramientas | Buscar en Tema | Desplegado |
#1
|
|||
|
|||
Arrastrar y soltar "fuera" de delphi.
Hola:
Lo que pretendo es arrastrar y soltar un fichero fuera -Escritorio, editor de texto, programa de correo, ...- de la aplicación. En concreto: en la aplicación tengo un TListBox con el nombre de algunos de los fichero que están almacenados en una carpeta. Quiero que el usuario pueda arrastrar desde el TListBox al Escritorio, editor de texto, ... el fichero que está representado por su nombre en el TListBox. Igual que cuando, por ejemplo, desde Lotus Notes arrastramos y soltamos en el Escritorio un fichero que lleva anexado el correo. Muchas gracias de antemano. Y Felices Fiestas.
__________________
Sonríe. Mañana puede ser peor. |
#2
|
||||
|
||||
Hola.
Imagino que dependiendo lo que quieras hacer con el archivo, si abrirlo, copiarlo al escritorio, etc. tendrás que ejecutar una acción u otra. Si es abrirlo puedes usar el comando "ShellExecute" para abrirlo el archivo con el programa que tenga predeterminado windows para ello. Para copiarlo al escritorio imagino que lo más simple es copiarlo desde su ubicación original a la carpeta de windows donde se ubica lo que hay en el escritorio (que ahora mismo no recuerdo cual es) y te aparecerá directamente. Espero haberte dado alguna idea. Saludos
__________________
Be water my friend. |
#3
|
|||
|
|||
Hola newtron.
Cita:
En principio me conformaría con saber si han soltado el "archivo" sobre una carpeta/escritorio para copiarlo allí.
__________________
Sonríe. Mañana puede ser peor. |
#4
|
|||
|
|||
He encontrado la solución en swissdelphicenter en concreto en este tip de R.Kleinpeter ...Drag and Drop files from your application to Windows Explorer?
Decir que a pesar del título no sólo las carpetas de windows aceptan los ficheros que se arrastran, también he comprobado que lo hace Paint y el Bloc de notas. Tan sólo he tenido que modificar el tipo de Effect a LongInt en el procedimiento FileListBox1MouseMove. Nota: Trabajo con Wndows XP y Delphi 7. Por último dejo a continuación el código completo:
__________________
Sonríe. Mañana puede ser peor. |
Herramientas | Buscar en Tema |
Desplegado | |
|
|
Temas Similares | ||||
Tema | Autor | Foro | Respuestas | Último mensaje |
El programa se queda "colgado" mientras copia y luego "despierta" | NeWsP | OOP | 5 | 10-03-2010 22:05:40 |
Necesito llamar a métodos de clases "hija" desde su clase "padre" | Flecha | OOP | 17 | 20-04-2007 00:03:53 |
ComboBox - Pasar un "Key" presionado afuera como si fuera de allí | amadis | OOP | 7 | 10-11-2006 14:29:48 |
Fast Report "Fuera de memoria" | BECERRA | Impresión | 0 | 25-12-2005 12:40:29 |
"Curiosidad" fuera de Contexto | DANFIR | Conexión con bases de datos | 1 | 23-12-2003 08:00:58 |
|