资源简介
可以将web浏览器控件中加载的网页截取出来
代码片段和文件信息
// 通过 WebBrowser 获取网页截图 示例代码
// http://snowdream.cnblogs.com/
using System;
using System.Drawing;
using System.Windows.Forms;
namespace Snowdream.Sample.WebpageSnapshot
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
///
/// 按钮按下事件处理函数
///
///
///
private void SaveSnapshot_Click(object sender EventArgs e)
{
WebBrowser webBrowser = new WebBrowser(); // 创建一个WebBrowser
webBrowser.ScrollBarsEnabled = false; // 隐藏滚动条
webBrowser.Navigate(address.Text); // 打开网页
webBrowser.DocumentCompleted += new WebBrowserDocume
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2011-05-16 13:35 Snowdream.Sample.WebpageSnapshot\
目录 0 2011-05-16 13:35 Snowdream.Sample.WebpageSnapshot\bin\
目录 0 2011-05-16 14:06 Snowdream.Sample.WebpageSnapshot\bin\Debug\
文件 924394 2011-05-16 14:15 Snowdream.Sample.WebpageSnapshot\bin\Debug\Snapshot.jpg
文件 10240 2011-05-16 17:04 Snowdream.Sample.WebpageSnapshot\bin\Debug\Snowdream.Sample.WebpageSnapshot.exe
文件 24064 2011-05-16 17:04 Snowdream.Sample.WebpageSnapshot\bin\Debug\Snowdream.Sample.WebpageSnapshot.pdb
文件 11600 2011-05-16 17:05 Snowdream.Sample.WebpageSnapshot\bin\Debug\Snowdream.Sample.WebpageSnapshot.vshost.exe
文件 490 2010-03-17 22:39 Snowdream.Sample.WebpageSnapshot\bin\Debug\Snowdream.Sample.WebpageSnapshot.vshost.exe.manifest
文件 2463 2011-05-16 17:16 Snowdream.Sample.WebpageSnapshot\Form1.cs
文件 2604 2011-05-16 17:04 Snowdream.Sample.WebpageSnapshot\Form1.Designer.cs
文件 5817 2011-05-16 17:04 Snowdream.Sample.WebpageSnapshot\Form1.resx
目录 0 2011-05-16 13:35 Snowdream.Sample.WebpageSnapshot\obj\
目录 0 2011-05-16 13:35 Snowdream.Sample.WebpageSnapshot\obj\x86\
目录 0 2011-05-16 17:04 Snowdream.Sample.WebpageSnapshot\obj\x86\Debug\
文件 4501 2011-05-16 16:57 Snowdream.Sample.WebpageSnapshot\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache
文件 6414 2011-05-16 17:04 Snowdream.Sample.WebpageSnapshot\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
文件 400 2011-05-16 17:04 Snowdream.Sample.WebpageSnapshot\obj\x86\Debug\GenerateResource.read.1.tlog
文件 998 2011-05-16 17:04 Snowdream.Sample.WebpageSnapshot\obj\x86\Debug\GenerateResource.write.1.tlog
文件 8031 2011-05-16 17:04 Snowdream.Sample.WebpageSnapshot\obj\x86\Debug\ResolveAssemblyReference.cache
文件 1189 2011-05-16 17:05 Snowdream.Sample.WebpageSnapshot\obj\x86\Debug\Snowdream.Sample.WebpageSnapshot.csproj.FileListAbsolute.txt
文件 10240 2011-05-16 17:04 Snowdream.Sample.WebpageSnapshot\obj\x86\Debug\Snowdream.Sample.WebpageSnapshot.exe
文件 180 2011-05-16 17:04 Snowdream.Sample.WebpageSnapshot\obj\x86\Debug\Snowdream.Sample.WebpageSnapshot.Form1.resources
文件 24064 2011-05-16 17:04 Snowdream.Sample.WebpageSnapshot\obj\x86\Debug\Snowdream.Sample.WebpageSnapshot.pdb
文件 180 2011-05-16 14:04 Snowdream.Sample.WebpageSnapshot\obj\x86\Debug\Snowdream.Sample.WebpageSnapshot.Properties.Resources.resources
目录 0 2011-05-16 13:35 Snowdream.Sample.WebpageSnapshot\obj\x86\Debug\TempPE\
文件 524 2011-05-16 13:35 Snowdream.Sample.WebpageSnapshot\Program.cs
目录 0 2011-05-16 13:35 Snowdream.Sample.WebpageSnapshot\Properties\
文件 1494 2011-05-16 13:35 Snowdream.Sample.WebpageSnapshot\Properties\AssemblyInfo.cs
文件 2892 2011-05-16 13:35 Snowdream.Sample.WebpageSnapshot\Properties\Resources.Designer.cs
文件 5612 2011-05-16 13:35 Snowdream.Sample.WebpageSnapshot\Properties\Resources.resx
文件 1117 2011-05-16 13:35 Snowdream.Sample.WebpageSnapshot\Properties\Settings.Designer.cs
............此处省略3个文件信息
- 上一篇:C# GDI 树状结构图
- 下一篇:wpf ui框架
相关资源
- C#winform打印指定区域 -控件拖动 -设置
- XXTEA算法的C#实现和JS实现,可以互相
- asp.net 网页静态化组件(shipingx-Stati
- 网页flv播放器
- browerPhotoC#网页截图(不打开网页)
- 仿苹果Safari 自定义控件(tab切换控件
- Treeview控件用法基础
- log4net 记录web application程序 全局错误
- 在webform中使用 mvc部分视图
- 网页静态化
- Html文件上传控件(整理前台使用版)
- web api 文件管理器(附文件上传以及
- WEBBROWER控件使用代理访问指定网页
- GoogleBookDownloader WebClient 读取网页源码
-
Couchba
se使用教程(文档) - 屏蔽Flash控件右键菜单,并使用自己设
-
C# 获取任意网页标题(ti
tle) - 自定义 AspNet web服务器
- vb 具有预览功能的图像查看器用户控
- 具有预览功能的图像查看器用户控件
- 使用Window 自带的控件 axWindowsMediaPla
- winform操作webform后台
- 设置控件的相对布局位置不变
- 重绘ListBox控件
- 使用键盘控制窗体或控件的移动
- Progressbar进度条控件
- SourceGrid4_20(Webcam-Capture-AForge.Net)
- WebSockets客户端消息分发
- C#遍历指定文件夹(并把数据加载到
- winform调用webservice
评论
共有 条评论