清除WebBrowser控件的浏览历史记录 [英] Clear WebBrowser control browsing history

查看:307
本文介绍了清除WebBrowser控件的浏览历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在WebBrowser完成浏览后清除WebBrowser控件历史记录。

I want to clear WebBrowser control history after WebBrowser completes its browsing.

推荐答案

实际上,有两种历史记录。一个是访问的页面列表,另一个是您在IE的历史记录用户界面中看到的实际历史记录。

Actually, there are two types of history. One is "Visited" pages list, and the other is the actual history you see in IE's history user interface.

如果要删除访问的页面列表,则需要使用DeleteUrlCacheEntry删除每个项目。通过使用FindFirst / NextUrlCacheEntry API进行遍历,您可以访问创建这些项目的时间和日期,因此只能删除在浏览器会话开始之后和结束之前创建的项目。

If you want to remove the visited pages list, you need to use DeleteUrlCacheEntry to delete each item. By looping through using FindFirst/NextUrlCacheEntry API's you can get access to the time and date these items were creates, and therefore only delete the items created after your browser session started and before it was finished.

对于FindFirst / NextUrlCacheEntry和DeleteUrlCacheEntry信息,您可以使用在线预写的代码,然后轻松创建过滤器来确定要循环浏览的项目。缓存条目。

For FindFirst/NextUrlCacheEntry and DeleteUrlCacheEntry information, there are pre-written codes online that you can use, and then it will be easy for you to create a filter to decide which items you want deleted when you are looping through these cache entries.

让我知道是否可以提供进一步的帮助。

Let me know if I can be of further assistance.

这篇关于清除WebBrowser控件的浏览历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆