Ver Mensaje Individual
  #3  
Antiguo 21-07-2008
Avatar de Caral
[Caral] Caral is offline
Miembro Premium
 
Registrado: ago 2006
Posts: 7.659
Reputación: 25
Caral Va por buen camino
Hola
Bueno, tomadlo en serio, que, acaso estamos en la Taberna.
Aqui va el siguiente codigo:

Código Delphi [-]
uses
  ShellAPI, ShlObj, ActiveX;

var
  pidl, pidlSelected: PItemIDList;
  BrowseInfo: TBrowseInfo;
  Directorio: string
begin
  if SHGetSpecialFolderLocation(Handle, CSIDL_DESKTOP, pidl) = NOERROR then
  begin
    with BrowseInfo do
    begin
      hwndOwner := Handle;
      pidlRoot := pidl;
      GetMem(pszDisplayName, MAX_PATH);
      lpszTitle := PChar('Busque el Programa No Novatos' + #13#10 + 
                         'Seguro estara por aqui, Si no lo encuentra, Reinstalelo.');
      ulFlags := BIF_BROWSEINCLUDEFILES;
      lpfn := nil;
      lParam := 0;
      iImage := -1;
    end;
    pidlSelected := SHBrowseForFolder(BrowseInfo);
    if pidlSelected <> nil then
    begin
      SHGetPathFromIDList(pidlSelected, BrowseInfo.pszDisplayName);
      Directorio := StrPas(BrowseInfo.pszDisplayName);
      CoTaskMemFree(pidlSelected);
    end;
    FreeMem(BrowseInfo.pszDisplayName);
    CoTaskMemFree(pidl);
  end;
end;
Saludos
Responder Con Cita