请教一个浏览器编程的问题。

seeyard 2003-10-21 09:10:25
我在我的程序之中使用了WebBrowser Control,我想知道WebBrowser Control在加载网页内部的资源的时候,会触发什么样的事件,比如,现在要加载一幅图片,我能否在它加载之前,把图片的URL改成另外一个,也就是加载成另一幅图片。请各位高手帮忙,并欢迎讨论。
...全文
60 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
stephenli 2003-12-06
  • 打赏
  • 举报
回复
up,
学习!
inethax 2003-12-06
  • 打赏
  • 举报
回复
up
zgoalh 2003-10-24
  • 打赏
  • 举报
回复
Good Boy , Mr saucer(思归) !!!
saucer 2003-10-22
  • 打赏
  • 举报
回复
yes, sorry, you are right, the browser does not fire BeforeNavigate2 for images and other embedded objects, only for the HTML page itself. You have to register a temporary Asynchronous Pluggable Protocol (APP) handler for HTTP protocol, see

About Asynchronous Pluggable Protocols
http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/pluggable/overview/overview.asp

Asynchronous Pluggable Protocol
http://www.codeguru.com/atl/asyncpp.shtml

INFO: Implementing HTTP-like Asynchronous Pluggable Protocols
http://support.microsoft.com/default.aspx?kbid=303740
seeyard 2003-10-22
  • 打赏
  • 举报
回复
等待中~~~
seeyard 2003-10-21
  • 打赏
  • 举报
回复
谢谢思归先,但是...
BeforeNavigate2只在导航开始的时候执行一次,
我需要的是每次加载外部资源的时候都会执行的消息。
saucer 2003-10-21
  • 打赏
  • 举报
回复
use BeforeNavigate2, see

http://msdn.microsoft.com/library/default.asp?url=/workshop/browser/webbrowser/webbrowser.asp
kandyasp 2003-10-21
  • 打赏
  • 举报
回复
不懂,帮你顶,关注学习中

7,540

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 VC.NET
社区管理员
  • VC.NET社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧