• 大小: 0.37M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-02-27
  • 语言: C#
  • 标签:

资源简介

两种方式实现网页快照,快速截屏网页,不必打开浏览器

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using browerPhoto.core;

namespace browerPhoto
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender EventArgs e)
        {
            var url = this.txtUrl.Text;
            var dir = Environment.GetFolderPath(Environment.SpecialFolder.Desktop);
            var path = Path.Combine(dir DateTime.Now.Ticks + “.jpg“);
            ImageHelper.SaveUrlToImage(url path ImageType.JPG);
            MessageBox.Show($“生成成功!截图已保存至{path}“);

        }

        private void button2_Click(object sender EventArgs e)
        {
            Bitmap m_Bitmap = WebSnapshotsHelper.GetWebSiteThumbnail(this.txtUrl.Text 800 12

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2020-03-06 23:52  .vs\
     目录           0  2020-03-06 23:52  .vs\browerPhoto\
     目录           0  2020-03-07 00:13  .vs\browerPhoto\v16\
     文件       52736  2020-03-07 00:19  .vs\browerPhoto\v16\.suo
     目录           0  2020-03-06 23:52  .vs\browerPhoto\v16\Server\
     目录           0  2020-03-07 00:19  .vs\browerPhoto\v16\Server\sqlite3\
     文件           0  2020-03-06 23:52  .vs\browerPhoto\v16\Server\sqlite3\db.lock
     文件      593920  2020-03-07 00:19  .vs\browerPhoto\v16\Server\sqlite3\storage.ide
     目录           0  2020-03-07 00:13  .vs\browerPhoto\v16\TestStore\
     目录           0  2020-03-07 00:13  .vs\browerPhoto\v16\TestStore\0\
     文件    20971556  2020-03-07 00:13  .vs\browerPhoto\v16\TestStore\0\000-0000.testlog
     文件          24  2020-03-07 00:13  .vs\browerPhoto\v16\TestStore\0\testlog.manifest
     目录           0  2020-03-07 00:17  browerPhoto\
     文件         187  2016-12-07 20:06  browerPhoto\App.config
     文件        3773  2020-03-07 00:15  browerPhoto\Form1.Designer.cs
     文件        1412  2020-03-07 00:17  browerPhoto\Form1.cs
     文件        5817  2020-03-07 00:15  browerPhoto\Form1.resx
     文件         534  2016-12-07 20:07  browerPhoto\Program.cs
     目录           0  2016-12-07 20:07  browerPhoto\Properties\
     文件        1452  2016-12-07 20:07  browerPhoto\Properties\AssemblyInfo.cs
     文件        2852  2016-12-07 20:07  browerPhoto\Properties\Resources.Designer.cs
     文件        5612  2016-12-07 20:06  browerPhoto\Properties\Resources.resx
     文件        1098  2016-12-07 20:07  browerPhoto\Properties\Settings.Designer.cs
     文件         249  2016-12-07 20:06  browerPhoto\Properties\Settings.settings
     目录           0  2016-12-07 20:06  browerPhoto\bin\
     目录           0  2016-12-07 20:33  browerPhoto\bin\Debug\
     文件       14848  2020-03-07 00:17  browerPhoto\bin\Debug\browerPhoto.exe
     文件         187  2016-12-07 20:06  browerPhoto\bin\Debug\browerPhoto.exe.config
     文件       36352  2020-03-07 00:17  browerPhoto\bin\Debug\browerPhoto.pdb
     文件       24224  2016-12-07 20:40  browerPhoto\bin\Debug\browerPhoto.vshost.exe
     文件         187  2016-12-07 20:06  browerPhoto\bin\Debug\browerPhoto.vshost.exe.config
............此处省略24个文件信息

评论

共有 条评论