Buscar

Abrindo a caixa localizar arquivo

Código

CSIDL_DRIVES - My Computer
  SIDL_CONTROLS - Control Panel
  CSIDL_DESKTOP - Desctop
  CSIDL_BITBUCKET - Recycle Bin
 

  procedure TForm1.Button1Click(Sender: TObject); //
    uses ShlObj, ShellAPI, ActiveX
  var
    pidl: PITEMIDLIST;
    PMalloc: IMalloc;
    sei : TShellExecuteInfo;
  begin
    try
      SHGetMalloc(PMalloc);
      ZeroMemory(@sei, sizeof(sei));
      SHGetSpecialFolderLocation(0,CSIDL_DRIVES,pidl);
      with sei do
      begin
        cbSize := SizeOf(sei);
        // nShow := SW_SHOWNORMAL;
        // lpFile := PChar('C:');
        fMask := SEE_MASK_INVOKEIDLIST;
        lpVerb := 'find';
        lpIDList := pidl;
      end;
      ShellExecuteEx(@sei);
    finally
      pMalloc._Release;
      pMalloc := nil;
    end;
  end;

Publicidade

Vote na dica




Quantidade de votos: 0 votos
Aceitação: 0%


Detalhes da dica

Categoria: Arquivos
Adicionada dia: 30/07/03
Por: Mario C. Neto
Visualizada: 2855 vezes

Planeta Delphi - Tudo sobre programação Delphi Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009