Get IE favorites and display them in a menue

pragmatiker

New member
Joined
Oct 13, 2005
Messages
4
Programming Experience
Beginner
Hi,
I am using vb.net 2005 and want to read all my internet explorer favorites to display them in a menue in my application (like the ie menue)
How can I read all my favorites and display them? Anyone an idea?
Thx!
 
Edit:

Don't mind me, I'm being dumb. :)

System.Environment.GetFolderPath(Environment.SpecialFolder.Favorites)

Use this path and read each file name into your menu.
 
Last edited:
It's the same as reading any other directory.

VB.NET:
[SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] favDirect [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] System.IO.Directory
[/SIZE][SIZE=2][COLOR=#0000ff]Dim[/COLOR][/SIZE][SIZE=2] arrFiles() [/SIZE][SIZE=2][COLOR=#0000ff]As[/COLOR][/SIZE][SIZE=2] [/SIZE][SIZE=2][COLOR=#0000ff]String
[/COLOR][/SIZE][SIZE=2]arrFiles = favDirect.GetFiles(System.Environment.GetFolderPath(Environment.SpecialFolder.Favorites))
[/SIZE]

This will give you a string array of the file names in the favorites folder.

Before you ask, I'm going to leave it up to you to figure out how to make them a link. :)
 
The path is the link. Unless you're building this in ASP.Net (or have an IE window in your form), you're going to need to start an instance of IE.

Play with it a bit, we're here to help; but we're not free contractors. :)
 
Back
Top