AjpdSoft
Principal
· Inicio
· Buscar
· Contactar
· Descargas
· Enciclopedia
· Estadísticas
· Eventos
· Foros
· Manuales, Artículos
· Nuestra historia
· Quiénes somos
· Recomiéndanos
· Temas
· Top 10
· Trucos Delphi, PHP, Java, Visual Studio
· Tu cuenta
Descargas

Últimas Descargas
· AjpdSoft Encriptar ficheros con CAPICOM

· AjpdSoft Zoom

· AjpdSoft Obtener datos certificados digitales

· DavSoft Note Código fuente Delphi

· DavSoft Agenda Código Fuente Delphi ADO y Access

· AjpdSoft Obtener datos procesador WMI

· AjpdSoft Mover ratón con teclado

· AjpdSoft Esquema XML Tree

· AjpdSoft Quitar dispositivos USB de forma segura

· AjpdSoft Ping ICMP


Lo más descargado
· AjpdSoft Generador de códigos de barras

· AjpdSoft Registro de OCX y DLL Código Fuente Delphi

· AjpdSoft Conversor Hexadecimal, Decimal, Texto - Código Fuente Delphi

· AjpdSoft Inventario PCs

· AjpdSoft Aviso cambio IP pública

Términos enciclopedias
Últimos
· COM
Enc.: Informática

· WMI
Enc.: Informática

· ISO
Enc.: Informática

· cluster
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· DMZ - Zona desmilitarizada
Enc.: Informática

· MAC (Dirección MAC)
Enc.: Informática


Lo más visitado

· At
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· Attrib
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· Arp
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· net use unidad: \\nombrepc\recursocompartido
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· bootcfg addsw
Enc.: Comandos Windows XP/Windows 2000/2003 (consola MS-DOS)

· MSKSrvr.exe
Enc.: Procesos en memoria
Eventos
Septiembre

DLMMJVS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Consejos
Lenguajes
Selecciona Idioma de la Interfaz:

Webs recomendadas
Orasite.com



Coloca tu web aquí
 
| Más
 
Obtener todas las páginas web de la carpeta favoritos de Internet Explorer - Delphi
Lenguaje de programación Borland Delphi


Abajo mostramos el código fuente para obtener la lista de todas las páginas web que tenemos en la carpeta Favoritos de Internet Explorer. Para ello necesitaremos un formulario, un botón y un ListBox:

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComObj, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    ListBox1: TListBox;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

uses 
  ShlObj, ActiveX; 

function GetIEFavourites(const favpath: string): TStrings; 
var 
  searchrec: TSearchRec; 
  str: TStrings; 
  path, dir, FileName: string; 
  Buffer: array[0..2047] of Char; 
  found: Integer; 
begin 
  str := TStringList.Create; 
  // Get all file names in the favourites path 
  path  := FavPath + '\*.url'; 
  dir   := ExtractFilepath(path); 
  found := FindFirst(path, faAnyFile, searchrec); 
  while found = 0 do 
  begin 
    // Get now URLs from files in variable files 
    Setstring(FileName, Buffer, GetPrivateProfilestring('InternetShortcut', 
      PChar('URL'), nil, Buffer, SizeOf(Buffer), PChar(dir + searchrec.Name))); 
    str.Add(FileName); 
    found := FindNext(searchrec); 
  end; 
  // find Subfolders 
  found := FindFirst(dir + '\*.*', faAnyFile, searchrec); 
  while found = 0 do 
  begin 
    if ((searchrec.Attr and faDirectory) > 0) and (searchrec.Name[1] <> '.') then 
      str.Addstrings(GetIEFavourites(dir + '\' + searchrec.Name)); 
    found := FindNext(searchrec); 
  end; 
  FindClose(searchrec); 
  Result := str; 
end; 

procedure FreePidl(pidl: PItemIDList); 
var 
  allocator: IMalloc; 
begin 
  if Succeeded(SHGetMalloc(allocator)) then 
  begin 
    allocator.Free(pidl); 
    {$IFDEF VER100} 
    allocator.Release; 
    {$ENDIF} 
  end; 
end; 

procedure TForm1.Button1Click(Sender: TObject); 
var 
  pidl: PItemIDList; 
  FavPath: array[0..MAX_PATH] of Char; 
begin 
  if Succeeded(ShGetSpecialFolderLocation(Handle, CSIDL_FAVORITES, pidl)) then 
  begin 
    if ShGetPathfromIDList(pidl, FavPath) then
      ListBox1.Items := GetIEFavourites(StrPas(FavPath)); 
    // The calling application is responsible for freeing the PItemIDList-pointer 
    // with the Shell's IMalloc interface 
    FreePIDL(pidl); 
  end; 
end; 


end.









Copyright © por AjpdSoft Derechos Reservados.

Publicado el: 2003-12-11 (943 Lecturas)

[ Volver Atrás ]
Content ©
Esta web NO CONTIENE ningún tipo de software malicioso (malware), por ello podéis descargar el código fuente de los programas gratuitamente