Ver Mensaje Individual
  #1  
Antiguo 16-04-2007
kapullok_2006 kapullok_2006 is offline
Miembro
 
Registrado: mar 2007
Posts: 90
Reputación: 18
kapullok_2006 Va por buen camino
Unhappy componente q lee unidades

hiola,tengo este código:
Código Delphi [-]
procedure TForm1.Timer1Timer(Sender: TObject);
var encontradas: boolean;
    n: integer;
begin
     encontradas:= false; //de momento no encuentra ficheros de fotos
 
     if not(encontradas) then
     begin
       FileListBox1.Directory:='G:\';
       directorio:='G:\';
       FilelistBox1.Update;
       if FileListBox1.Items.Count > 0 then
       begin
          Timer1.Enabled:= false;
          encontradas:= true;
          i:= 0;
          RellenarFotos(i);
          cantidades.Clear;
          for n:= 0 to FileListBox1.Items.Count-1 do
          begin
               cantidades.Add('0');
          end;
       end;
     end;
     if not(encontradas) then
     begin
          FileListBox1.Directory:= 'E:\';
          directorio:= 'E:\';
          FilelistBox1.Update;
          if FileListBox1.Items.Count > 0 then
          begin
               Timer1.Enabled:= false;
               encontradas:=true;
               i:= 0;
               RellenarFotos(i);
               cantidades.Clear;
               for n:= 0 to FileListBox1.Items.Count-1 do
               begin
                  cantidades.Add('0');
               end;
          end;
     end;
     if not(encontradas) then
     begin
          FileListBox1.Directory:= 'F:\';
          directorio:= 'F:\';
          FileListBox1.Update;
          if FileListBox1.Items.Count > 0 then
          begin
               Timer1.Enabled:= false;
               i:= 0;
               RellenarFotos(i);
               cantidades.Clear;
               for n:= 0 to FileListBox1.Items.Count-1 do
               begin
                  cantidades.Add('0');
               end;
          end;
     end;
     if not(encontradas) then
     begin
         FileListBox1.Directory:='H:\';
         directorio:='H:\';
         FileListBox1.Update;
         if FileListBox1.Items.Count>0 then
         begin
             Timer1.Enabled:=false;
             i:=0;
             RellenarFotos(i);
             cantidades.Clear;
             for n:= 0 to FileListBox1.Items.Count-1 do
             begin
               cantidades.Add('0');
             end;
         end;
     end;
end;
leerá esta unidad 'G',si está enchufada,pero si no está enchufada da error.
¿Algún componente q lee de lector de tarjetas,USB,grabadora DVD,Blueetooh,...?
ES para leer automáticamente fotos de una SD por ejemplo.

Saludos delfileros.
Responder Con Cita