• 大小: 0.19M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: 内存  C#  

资源简介

C# 从内存中获取webbrowser控件截图,可以后台或者隐藏窗体截图

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

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

        private void Button1_Click(object sender EventArgs e)
        {
            if(RichTextBox1.Text!=““)
                WebBrowser1.Navigate(RichTextBox1.Text);
        }
        internal static class NativeMethods
        {
            [StructLayout(LayoutKind.Sequential)]
            public sealed class tagDVTARGETDEVICE
            {
           

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-07-27 14:15  WindowsApplication1\
     文件         990  2018-07-27 14:15  WindowsApplication1\WindowsApplication1.sln
     文件       23040  2018-07-27 14:33  WindowsApplication1\WindowsApplication1.v11.suo
     目录           0  2018-07-27 14:15  WindowsApplication1\WindowsFormsApplication1\
     文件         187  2018-07-27 14:14  WindowsApplication1\WindowsFormsApplication1\App.config
     目录           0  2018-07-27 14:14  WindowsApplication1\WindowsFormsApplication1\bin\
     目录           0  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\bin\Debug\
     文件      144041  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\bin\Debug\20180727143324.png
     文件       12288  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe
     文件         187  2018-07-27 14:14  WindowsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe.config
     文件       22016  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb
     文件       22984  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe
     文件         187  2018-07-27 14:14  WindowsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.config
     文件         490  2015-10-22 09:54  WindowsApplication1\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest
     文件        6483  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\Form1.cs
     文件        3788  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\Form1.Designer.cs
     文件        5817  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\Form1.resx
     目录           0  2018-07-27 14:14  WindowsApplication1\WindowsFormsApplication1\obj\
     目录           0  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\obj\Debug\
     文件        6995  2018-07-27 14:15  WindowsApplication1\WindowsFormsApplication1\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件           0  2018-07-27 14:14  WindowsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
     文件           0  2018-07-27 14:14  WindowsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
     文件           0  2018-07-27 14:14  WindowsApplication1\WindowsFormsApplication1\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
     目录           0  2018-07-27 14:14  WindowsApplication1\WindowsFormsApplication1\obj\Debug\TempPE\
     文件         897  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt
     文件         975  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csproj.GenerateResource.Cache
     文件        2209  2018-07-27 14:24  WindowsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.csprojResolveAssemblyReference.cache
     文件       12288  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.exe
     文件         180  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Form1.resources
     文件       22016  2018-07-27 14:33  WindowsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.pdb
     文件         180  2018-07-27 14:24  WindowsApplication1\WindowsFormsApplication1\obj\Debug\WindowsFormsApplication1.Properties.Resources.resources
............此处省略8个文件信息

评论

共有 条评论