![]() |
![]() |
| Paypal | 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 |
|
#4
|
||||
|
||||
|
Hola andres_89.
Creo que ahora entendí la idea... Fijate si te sirve de este modo: Código:
#include <io.h>
#include <dir.h>
TStrings *FileNames;
int Contador=0;
void ListFiles(char *Dir, TStrings *TS)
{
struct _finddata_t fdt;
long hFile;
char tmp[MAX_PATH];
chdir(Dir);
fdt.attrib = _A_SUBDIR;
if ((hFile = _findfirst("*.*", &fdt) ) != -1) {
do {
if (fdt.attrib == _A_SUBDIR) {
if (strcmp(fdt.name,".")!= 0 && strcmp(fdt.name,"..") != 0) {
strcpy(tmp, Dir);
strcat(tmp, "\\");
strcat(tmp, fdt.name);
ListFiles(tmp, TS);
}
}
else
TS->Add(String(fdt.name));
} while (_findnext(hFile, &fdt) == 0);
_findclose(hFile);
};
}
void __fastcall TForm1::FormCreate(TObject *Sender)
{
FileNames = new TStringList;
ListFiles("C:\\UNA_CARPETA", FileNames);
Timer1->Enabled = false;
Timer1->Interval = 250;
}
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Timer1->Enabled = true;
}
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
Timer1->Enabled = (Contador < FileNames->Count);
if (Timer1->Enabled) {
Label1->Caption = FileNames->Strings[Contador];
Contador++;
}
}
void __fastcall TForm1::FormDestroy(TObject *Sender)
{
delete FileNames;
}
![]()
__________________
Daniel Didriksen Guía de estilo - Uso de las etiquetas - La otra guía de estilo .... |
| Herramientas | Buscar en Tema |
| Desplegado | |
|
|
Temas Similares
|
||||
| Tema | Autor | Foro | Respuestas | Último mensaje |
| Mostrar mas archivos de un sitio por FTP | ctronx | Varios | 3 | 03-03-2012 00:48:56 |
| Mostrar en una label un item de un ChekListBox | cslbcn | OOP | 2 | 23-01-2009 18:07:38 |
| Como mostrar Resultados de una consulta en componentes como los Edit,Label y DbGrids! | danny | Conexión con bases de datos | 2 | 08-05-2008 23:35:46 |
| Mostrar archivos 3ds | Drake | OOP | 1 | 04-08-2006 20:40:13 |
| Mostrar archivos y directorios en TListView | Drake | C++ Builder | 1 | 12-01-2006 15:48:54 |
|