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

資源簡介

一款很好用的屏幕截圖程序,包含全部源代碼。支持鼠標操作,支持局部截圖。截圖功能基本和QQ截圖類似,可以拖動邊框,改變邊框大小。用Visual Studio 2010 開發,語言為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.Text.Regularexpressions;
using?System.Threading.Tasks;
using?System.Windows.Forms;

namespace?ScreenShot
{
????//定義委托
????public?delegate?void?SetICS(bool?isScreenShot);
????public?partial?class?Catch?:?Form
????{
????????//鼠標位置的枚舉
????????private?enum?MouseLocation
????????{
????????????LeftUpPointLeftDownPointRightUpPointRightDownPointLeftLineRightLineUpLineDownLine
????????????InRectangleOutOfRectangle
????????}
????????private?MouseLocation?mouseLocation;
????????//定義該委托的事件
????????public?event?SetICS?SetICSEvent;
????????//截屏原始圖片
????????private?Bitmap?originBmp;
????????//鼠標左鍵按下的坐標
????????private?Point?mouseDownPoint;
????????//調節截圖框時的固定不動點
????????private?Point?fixedPoint;
????????//是否允許繪制矩形截圖狀態
????????private?bool?isDraw;
????????//截圖完成狀態
????????private?bool?isCatched;
????????//是否允許調節矩形框
????????private?bool?isAdjust;
????????//繪制的截圖矩形框
????????private?Rectangle?rect;
????????public?Catch()
????????{
????????????InitializeComponent();
????????}
????????//將當前屏幕截圖,顯示到全屏無標題欄窗體上
????????private?void?Catch_Load(object?sender?EventArgs?e)
????????{
????????????//設置截圖狀態為開始
????????????SetICSEvent(true);
????????????//隱藏窗體,保證截屏圖片為當前屏幕而不是被窗體覆蓋
????????????this.Hide();
????????????//以當前窗口大小(窗口默認最大化,即全屏)創建截屏空白圖片
????????????this.originBmp?=?new?Bitmap(this.Widththis.Height?);
????????????//以截屏圖片作為畫板
????????????using?(Graphics?gs?=?Graphics.FromImage(originBmp))
????????????{
????????????????//復制當前屏幕到畫板上,即將截屏圖片的內容設置為當前屏幕
????????????????gs.CopyFromScreen(0?0?0?0?this.Size);
????????????}
????????????//將截屏圖片設為窗體背景
????????????this.BackgroundImage?=?new?Bitmap(this.originBmp);
????????????//添加截屏時的黑色遮罩,即在窗體背景上繪制全屏半透明黑色填充矩形
????????????using?(Graphics?blackgs?=?Graphics.FromImage(this.BackgroundImage))
????????????{
????????????????using?(SolidBrush?backBrush?=?new?SolidBrush(Color.FromArgb(100?0?0?0)))
????????????????{
????????????????????blackgs.FillRectangle(backBrush?0?0?this.Width?this.Height);
????????????????}
????????????}
????????????//顯示窗體
????????????this.Show();
????????????//激活當前窗體,使之具有焦點。主要針對win8?Metro界面的截圖。
????????????this.Activate();
????????}
????????//右鍵點擊動作
????????private?void?Catch_MouseClick(object?sender?MouseEventArgs?e)
????????{
????????????if?(e.Button?==?MouseButtons.Right)
????????????{
????????????????//開始繪制矩形框前,即初始狀態,直接退出截圖
????????????????if?(isCatched?==?false)
????????????????{
????????????????????this.Close();
????????????????}
????????????????//若矩形框已繪制,設定狀態為初始狀態,設定矩形各參數為0,
????????????????//刷新窗體重繪,以清除已繪制的矩形,重新開始截圖,即撤銷功能。
????????????????else
????????????????{
????????????????????this.isCatched?=?false;
????????????????????this.isAdjust?=?false;
????????????????????this.isDraw?=?false;
????????????????????this.rect?=?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????99678??2012-10-04?23:17??ScreenShot\34.ico

?????文件????????167??2016-05-26?22:50??ScreenShot\App.config

?????文件???????1819??2016-05-26?22:52??ScreenShot\bin\Debug\CatchScreen.application

?????文件?????522752??2016-05-26?22:52??ScreenShot\bin\Debug\CatchScreen.exe

?????文件????????167??2016-05-26?22:50??ScreenShot\bin\Debug\CatchScreen.exe.config

?????文件???????4916??2016-05-26?22:52??ScreenShot\bin\Debug\CatchScreen.exe.manifest

?????文件??????50688??2016-05-26?22:52??ScreenShot\bin\Debug\CatchScreen.pdb

?????文件???????1819??2016-05-26?22:52??ScreenShot\bin\Debug\CatchScreen.vshost.application

?????文件????????167??2016-05-26?22:50??ScreenShot\bin\Debug\CatchScreen.vshost.exe.config

?????文件???????4916??2016-05-26?22:52??ScreenShot\bin\Debug\CatchScreen.vshost.exe.manifest

?????文件????????187??2012-10-03?16:48??ScreenShot\bin\Debug\GDI.vshost.exe.config

?????文件????????490??2012-06-02?22:34??ScreenShot\bin\Debug\GDI.vshost.exe.manifest

?????文件???????1815??2016-05-26?23:00??ScreenShot\bin\Debug\ScreenShot.application

?????文件?????522752??2016-05-26?23:00??ScreenShot\bin\Debug\ScreenShot.exe

?????文件????????167??2016-05-26?22:50??ScreenShot\bin\Debug\ScreenShot.exe.config

?????文件???????4910??2016-05-26?23:00??ScreenShot\bin\Debug\ScreenShot.exe.manifest

?????文件??????44544??2016-05-26?23:00??ScreenShot\bin\Debug\ScreenShot.pdb

?????文件??????11592??2016-05-26?22:59??ScreenShot\bin\Debug\ScreenShot.vshost.exe

?????文件????????167??2016-05-26?22:50??ScreenShot\bin\Debug\ScreenShot.vshost.exe.config

?????文件??????21974??2016-05-26?23:00??ScreenShot\Catch.cs

?????文件???????3009??2016-05-26?23:00??ScreenShot\Catch.Designer.cs

?????文件?????155840??2012-10-06?15:27??ScreenShot\Catch.resx

????..A..H.?????26624??2016-05-26?23:00??ScreenShot\CatchScreen.suo

?????文件???????1628??2012-10-06?16:17??ScreenShot\CatchScreen_TemporaryKey.pfx

?????文件????????759??2016-05-26?23:00??ScreenShot\HotKey.cs

?????文件????????843??2016-05-26?23:00??ScreenShot\Instruction.cs

?????文件???????6183??2016-05-26?23:00??ScreenShot\Instruction.Designer.cs

?????文件?????155637??2012-10-06?14:11??ScreenShot\Instruction.resx

?????文件???????4265??2016-05-26?23:00??ScreenShot\MainForm.cs

?????文件???????5899??2016-05-26?23:00??ScreenShot\MainForm.Designer.cs

............此處省略52個文件信息

評論

共有 條評論