可以使用ShellUIHelper对象:Dim dc As New SHDocVw.ShellUIHelper
    
dc.ImportExportFavorites False, "c:\afg.htm"该对象在引用Microsoft Internet Controls中www.applevb.com

解决方案 »

  1.   

     yousoft(阿友) 回复于2000-11-28 21:40:00 得50分 //本人是学Delphi的,实现如下,你自己对着VB写吧
    const 
      CLSID_ShellUIHelper: TGUID = '{64AB4BB7-111E-11D1-8F79-00C04FC2FBE1}'; 
    procedure TForm1.OrganizeFavorites1Click(Sender: TObject); 
    var 
      H: HWnd; 
      p: procedure(Handle: THandle; Path: PChar); stdcall; 
    begin 
            H := LoadLibrary(PChar('shdocvw.dll')); 
            if H <> 0 then 
              begin 
                p := GetProcAddress(H, PChar('DoOrganizeFavDlg')); 
                if Assigned(p) then p(Application.Handle, PChar(Favorites1.Hint)); 
              end; 
            FreeLibrary(h); 
    end; 
    procedure TForm1.AddtoFavorites1Click(Sender: TObject); 
    var 
      ShellUIHelper: ISHellUIHelper; 
      url, title: Olevariant; 
    begin 
            Title := EmbeddedWB1.LocationName; 
            Url := EmbeddedWB1.LocationUrl; 
            if Url <> '' then 
              begin 
                ShellUIHelper := CreateComObject(CLSID_SHELLUIHELPER) as IShellUIHelper; 
                ShellUIHelper.AddFavorite(url, title); 
              end; 
    end;  (班竹转贴,原出处:http://www.csdn.net/expert/TopicView.asp?id=26174 仅供参考)
      

  2.   

    哈哈,啊凯也是为用在dilphi中应该,太谢谢啦!