开发者

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;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜