Accessing Browser Favorites (WinForms/C#)
Where and how can I access web browser Favorites and histor开发者_如何学Cy?
Is it the same place for all browsers?
Thanks!
this is a small code to get the history for IE :
public List<string> PopulateUrlList()
{
string regKey = "Software\\Microsoft\\Internet Explorer\\TypedURLs";
RegistryKey subKey = Registry.CurrentUser.OpenSubKey(regKey);
string url = null;
List<string> urlList = new List<string>();
int counter = 1;
while (true) {
string sValName = "url" + counter.ToString();
url = (string)subKey.GetValue(sValName);
if ((object)url == null) {
break; // TODO: might not be correct. Was : Exit While
}
urlList.Add(url);
counter += 1;
}
return urlList;
}
精彩评论