webbrowser控件中如何把图片定位到资源文件中?

zcx2001 2009-02-12 10:11:02
如题,谢谢大家了 真的很困扰我
...全文
134 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
zcx2001 2009-02-27
  • 打赏
  • 举报
回复
google出来东西还有有点没有看懂 我看都是指出一个连接 然后能激活一个程序。 我要的是返回数据流阿 这个怎么处理阿
wzd24 2009-02-15
  • 打赏
  • 举报
回复
自定义一个URL资源协议。
并且让应用程序来响应这种请求。
具体的你可以上Baidu和Google查,或者来问我。
这里写不下。
cppfaq 2009-02-14
  • 打赏
  • 举报
回复
楼主需要的似乎是:
string path = Path.Combine(Application.StartupPath, "mypage.html");
webBrowser1.Navigate(path);

如果不是的话,反正就反正就取资源,折腾documenttext或者docuementstream了。
zcx2001 2009-02-14
  • 打赏
  • 举报
回复
厄 。。。。。不是 光显示一幅图片的 我是想把一个网页里边的图片都放到资源文件里边 包括这个网页 这个应该怎么做阿
csrwgs 2009-02-13
  • 打赏
  • 举报
回复
学习,没看懂,也不清楚是干啥用的。
cppfaq 2009-02-12
  • 打赏
  • 举报
回复

// If you are not sure about the exact resourceName,
// you can list all the embeded resouces via
// GetType().Assembly.GetManifestResourceNames()
string resourceName = "MyApp.Winter.jpg";
Stream stream = GetType().Assembly.GetManifestResourceStream(resourceName);

// show it in the webbrowser
webBrowser1.DocumentStream = stream;

110,566

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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