91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 61KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-28
  • 語言: C#
  • 標簽: C#??截圖??

資源簡介

我們知道如今截圖工具多如鴻毛,各種實現(xiàn)方式很多且復雜,此工具主要為大家展示C#版的截圖工具,方便、簡單、易學,大家有興趣可下載。

資源截圖

代碼片段和文件信息

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

namespace?Screenshot
{
????public?partial?class?Cutter?:?Form
????{
????????public?Cutter()
????????{
????????????InitializeComponent();
????????}
????????#region?定義程序變量
????????//?定義變量

????????//?用來記錄鼠標按下的坐標,用來確定繪圖起點
????????private?Point?DownPoint;

????????//?用來表示是否截圖完成
????????private?bool?CatchFinished?=?false;

????????//?用來表示截圖開始
????????private?bool?CatchStart?=?false;

????????//?用來保存原始圖像
????????private?Bitmap?originBmp;

????????//?用來保存截圖的矩形
????????private?Rectangle?CatchRectangle;
????????#endregion


????????///?
????????///?窗體初始化操作
????????///?

????????///?
????????///?
????????private?void?Cutter_Load(object?sender?EventArgs?e)
????????{
????????????//?設(shè)置控件樣式為雙緩沖,這樣可以有效減少圖片閃爍的問題
????????????//?第二個參數(shù)為true表示把第一個參數(shù)指定的樣式應用于控件;false?表示不應用。
????????????//?‘|‘表示位邏輯或運算
????????????this.Setstyle(Controlstyles.OptimizedDoubleBuffer?|?Controlstyles.AllPaintingInWmPaint?|?Controlstyles.UserPaint?true);
????????????this.Updatestyles();
????????????//?改變鼠標樣式
????????????this.Cursor?=?Cursors.Cross;
????????????//?保存全屏圖片
????????????originBmp?=?new?Bitmap(this.BackgroundImage);
????????}
????????///?
????????///?右鍵點擊退出
????????///?

????????///?
????????///?
????????private?void?Cutter_MouseClick(object?sender?MouseEventArgs?e)
????????{
????????????if?(e.Button?==?MouseButtons.Right)
????????????{
????????????????this.DialogResult?=?DialogResult.OK;
????????????????this.Close();
????????????}
????????}
????????///?
????????///?左鍵按下開始截屏
????????///?

????????///?
????????///?
????????private?void?Cutter_MouseDown(object?sender?MouseEventArgs?e)
????????{
????????????//?鼠標左鍵按下是開始畫圖,也就是截圖
????????????if?(e.Button?==?MouseButtons.Left)
????????????{
????????????????//?如果捕捉?jīng)]有開始
????????????????if?(!CatchStart)
????????????????{
????????????????????CatchStart?=?true;
????????????????????//?保存此時鼠標按下坐標
????????????????????DownPoint?=?new?Point(e.X?e.Y);
????????????????}
????????????}
????????}
????????///?
????????///?左鍵雙擊保存到剪貼板
????????///?

????????///?
????????///?
????????private?void?Cutter_MouseDoubleClick(object?sender?MouseEventArgs?e)
????????{
????????????if?(e.Button?==?MouseButtons.Left?&&?CatchFinished)
????????????{
????????????????//?新建一個與矩形一樣大小的空白圖片
????????????????Bitmap?CatchedBmp?=?new?Bitmap(CatchRectangle.Width?CatchRectangle.Height);

????????????????Graphics?g?=?Graphics.FromImage(CatchedBmp);

????????????????//?把originBmp中指定部分按照指

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2016-11-02?20:15??Screenshot\
?????文件?????????187??2016-11-02?19:36??Screenshot\App.config
?????目錄???????????0??2016-11-02?19:36??Screenshot\bin\
?????目錄???????????0??2016-11-02?19:46??Screenshot\bin\Debug\
?????文件???????12288??2016-11-02?20:15??Screenshot\bin\Debug\Screenshot.exe
?????文件?????????187??2016-11-02?19:36??Screenshot\bin\Debug\Screenshot.exe.config
?????文件???????32256??2016-11-02?20:15??Screenshot\bin\Debug\Screenshot.pdb
?????文件???????24224??2016-11-02?20:18??Screenshot\bin\Debug\Screenshot.vshost.exe
?????文件?????????187??2016-11-02?19:36??Screenshot\bin\Debug\Screenshot.vshost.exe.config
?????文件?????????490??2016-07-16?19:44??Screenshot\bin\Debug\Screenshot.vshost.exe.manifest
?????文件????????7039??2016-11-02?20:15??Screenshot\Cutter.cs
?????文件????????2222??2016-11-02?20:04??Screenshot\Cutter.Designer.cs
?????文件????????5817??2016-11-02?20:04??Screenshot\Cutter.resx
?????文件????????1943??2016-11-02?20:15??Screenshot\Form1.cs
?????文件????????3454??2016-11-02?20:15??Screenshot\Form1.Designer.cs
?????文件????????5817??2016-11-02?20:15??Screenshot\Form1.resx
?????目錄???????????0??2016-11-02?19:36??Screenshot\obj\
?????目錄???????????0??2016-11-02?20:15??Screenshot\obj\Debug\
?????文件?????????865??2016-11-02?19:36??Screenshot\obj\Debug\DesignTimeResolveAssemblyReferences.cache
?????文件????????7007??2016-11-02?19:50??Screenshot\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件?????????888??2016-11-02?20:18??Screenshot\obj\Debug\Screenshot.csproj.FileListAbsolute.txt
?????文件????????1036??2016-11-02?20:15??Screenshot\obj\Debug\Screenshot.csproj.GenerateResource.Cache
?????文件????????2211??2016-11-02?19:46??Screenshot\obj\Debug\Screenshot.csprojResolveAssemblyReference.cache
?????文件?????????180??2016-11-02?20:04??Screenshot\obj\Debug\Screenshot.Cutter.resources
?????文件???????12288??2016-11-02?20:15??Screenshot\obj\Debug\Screenshot.exe
?????文件?????????180??2016-11-02?20:15??Screenshot\obj\Debug\Screenshot.Form1.resources
?????文件???????32256??2016-11-02?20:15??Screenshot\obj\Debug\Screenshot.pdb
?????文件?????????180??2016-11-02?19:58??Screenshot\obj\Debug\Screenshot.Properties.Resources.resources
?????文件???????????0??2016-11-02?19:36??Screenshot\obj\Debug\TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs
?????文件???????????0??2016-11-02?19:36??Screenshot\obj\Debug\TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs
?????文件???????????0??2016-11-02?19:36??Screenshot\obj\Debug\TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs
............此處省略11個文件信息

評論

共有 條評論