VB Web浏览器禁用自动图像 [英] VB Web browser disable auto images

查看:236
本文介绍了VB Web浏览器禁用自动图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是这个论坛的新成员,我不知道是否将其发布在错误的部门.
我有问题,请尝试使用vb Web浏览器控件解决,是否与Visual Basic 2010一起使用


让我先审阅我的案子,以便了解

我的项目是显示和发送电子邮件,方法是由用户选择回复ReplyAll转发"
我的电子邮件是.eml"widnows实时电子邮件",我已将它们导出到我的计算机文件中.

要显示电子邮件,只需使用vb Web浏览器,然后将浏览器导航到计算机中存储的eml文件即可;
例如

me.webBrowser1.navigate("c:\ desktop \ emails \ email1.eml")
在这里..成功可以看到我的电子邮件正文的所有内容,但......
如果email1中有图片附件,则..我在文档末尾的Web浏览器始终自动插入该图片.
如果我查看浏览器的查看"源代码,则会看到这一行html代码

< CENTER>< IMG SRC ="CID:{E5A60042-773C-41AE-9A46B70436EB3BD6}/Koala.jpg"></CENTER>

就我而言,附件只是附件,不是嵌入在电子邮件中的图像.可视图像"只是附件,通常在回复电子邮件时,该图像附件不应位于我的Web浏览器中.
有什么办法可以禁用它吗?

我尝试在webrowser完成的情况下替换字符串,但是由于
无法正常工作
执行替换操作时,总是会刷新Web浏览器并一遍又一遍地重新开始,

me.webBrowser1.documentText = me.webbrowser1.documenttext.replace(unwantedString,EmptyString)

如果有不清楚的地方请告诉我.

有什么帮助如何弄清楚吗? :)
如果没有自动禁用的选项,我该如何替换字符串而不会阻止浏览器刷新?

hi ,am new in this forum and i dont know if am posting this in a wrong department.
i have a problem and try to figure it out with vb web browser control am working with Visual Basic 2010


let me first go through my case so to understand

my project is to display and send emails by the user selects Reply replyAll Forward
my emails are .eml "widnows live emails" and i have export them to my computer file.

to Display the email am simply using a vb web browser and am just navigating my browser to the eml file stored in my computer;
for example

me.webBrowser1.navigate("c:\desktop\emails\email1.eml")
here .. am succesfuly can see all the contents of the body of my email BUT...
if the email1 has a picture attachment then .. my webbrowser at the end of the document is always inserting automatically that images.
if i look at the View source of the browser i see this line of html code

<CENTER><IMG SRC="CID:{E5A60042-773C-41AE-9A46B70436EB3BD6}/Koala.jpg"></CENTER>

for my case the attachment is just attachment and is not an image embedded in the email "visual image" is only attachment and normally when am replying to email this image attachment should be not be in my web browser.
is there any way to disable that?

i try replace string in the event of webrowser completed but is not work becuase
when excecuting the replace is always refreshing the web browser and starts over and over again,

me.webBrowser1.documentText=me.webbrowser1.documenttext.replace(unwantedString,EmptyString)

please let me know if something is not clear.

is there any help how to figure it out? : )
if there is not option to disable that automatically how i can replace strings with out prevent the browser to refresh?

推荐答案

您应该看看
You should take a look at The most complete C# Webbrowser wrapper control[^] - the DownloadBegin can be used to prevent additional downloads.

Best regards
Espen Harlinn


这篇关于VB Web浏览器禁用自动图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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