• 大小: 714KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-06-06
  • 语言: C#
  • 标签: C#  截图  捕获  QQ  抓屏  

资源简介

效果截图于介绍 在博客中有 http://blog.csdn.net/crystal_lz/article/details/8274277 在上一个上传的资源上改的 修正了已知bug增加快捷键启动 以及是否加入开机自启

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

namespace _SCREEN_CAPTURE
{
    [Designer(typeof(ColorBoxDesginer))]
    public partial class ColorBox : Control
    {
        public ColorBox() {
            InitializeComponent();
            selectedColor = Color.Red;
            m_rectSelected = new Rectangle(-100 -100 14 14);

            this.Setstyle(Controlstyles.ResizeRedraw true);
            this.Setstyle(Controlstyles.OptimizedDoubleBuffer true);
            this.Setstyle(Controlstyles.AllPaintingInWmPaint true);
            this.Setstyle(Controlstyles.UserPaint true);
            this.Setstyle(Controlstyles.SupportsTransparentBackColor true);
        }

        private Color selectedColor;
        public Color SelectedColor {
            get { return selectedColor; }
        }

        private Point m_ptCurrent;
        private Rectangle m_rectSelected;
        private Bitmap m_clrImage = global::_SCREEN_CAPTURE.Properties.Resources.color;
        private Color m_lastColor;

        public delegate void ColorChangedHandler(object sender ColorChangedEventArgs e);
        public event ColorChangedHandler ColorChanged;
        protected virtual void OnColorChanged(ColorChangedEventArgs e) {
            if (this.ColorChanged != null)
                ColorChanged(this e);
        }

        protected override void onclick(EventArgs e) {
            Color clr = m_clrImage.GetPixel(m_ptCurrent.X m_ptCurrent.Y);
            if (clr.ToArgb() != Color.FromArgb(255 254 254 254).ToArgb()
                && clr.ToArgb() != Color.FromArgb(255 133 141 151).ToArgb()
                && clr.ToArgb() != Color.FromArgb(255 110 126 149).ToArgb()) {
                if (this.selectedColor != clr)
                    this.selectedColor = clr;
                this.Invalidate();
                this.OnColorChanged(new ColorChangedEventArgs(clr));
            }
            base.onclick(e);
        }

        protected override void onmousemove(MouseEventArgs e) {
            m_ptCurrent = e.Location;
            try {
                Color clr = m_clrImage.GetPixel(m_ptCurrent.X m_ptCurrent.Y);
                if (clr != m_lastColor) {
                    if (clr.ToArgb() != Color.FromArgb(255 254 254 254).ToArgb()
                        && clr.ToArgb() != Color.FromArgb(255 133 141 151).ToArgb()
                        && clr.ToArgb() != Color.FromArgb(255 110 126 149).ToArgb()
                        && e.X > 39) {
                        m_rectSelected.Y = e.Y > 17 ? 17 : 2;
                        m_rectSelected.X = ((e.X - 39) / 15) * 15 + 38;
                        this.Invalidate();
                    } else {
                        m_rectSelected.X = m_rectSelected.Y = -100;
                        this.Invalidate();
                    

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-12-11 03:31  _SCREEN_CAPTURE_TOOL\
     目录           0  2012-12-11 03:31  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\
     目录           0  2012-12-11 03:31  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\bin\
     目录           0  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\bin\Debug\
     文件      112128  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\bin\Debug\_SCREEN_CAPTURE.dll
     文件       99840  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\bin\Debug\_SCREEN_CAPTURE.pdb
     目录           0  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\bin\Release\
     文件      109056  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\bin\Release\_SCREEN_CAPTURE.dll
     文件       91648  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\bin\Release\_SCREEN_CAPTURE.pdb
     文件        4309  2012-12-08 23:20  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\ColorBox.cs
     文件        1202  2012-12-03 22:32  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\ColorBox.Designer.cs
     文件        5817  2012-12-03 03:09  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\ColorBox.resx
     文件         390  2012-12-03 02:17  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\ColorBoxDesginer.cs
     文件       24624  2012-12-15 01:24  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\FrmCapture.cs
     文件       16446  2012-12-08 22:42  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\FrmCapture.Designer.cs
     文件        6184  2012-12-08 22:42  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\FrmCapture.resx
     文件       29577  2012-12-10 22:12  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\ImageProcessBox.cs
     文件        1043  2012-11-28 21:50  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\ImageProcessBox.Designer.cs
     文件        4416  2012-11-29 01:17  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\MouseHook.cs
     目录           0  2012-12-11 03:31  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\obj\
     目录           0  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\obj\Debug\
     文件        9054  2012-12-11 19:17  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\obj\Debug\DesignTimeResolveAssemblyReferences.cache
     文件        7098  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
     文件        4348  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\obj\Debug\ResGen.read.1.tlog
     文件        1538  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\obj\Debug\ResGen.write.1.tlog
     目录           0  2012-12-11 03:31  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\obj\Debug\TempPE\
     文件        5632  2012-12-04 02:34  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll
     文件         180  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\obj\Debug\_SCREEN_CAPTURE.ColorBox.resources
     文件        2568  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\obj\Debug\_SCREEN_CAPTURE.csproj.FileListAbsolute.txt
     文件      112128  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\obj\Debug\_SCREEN_CAPTURE.dll
     文件         180  2012-12-15 04:02  _SCREEN_CAPTURE_TOOL\_SCREEN_CAPTURE\obj\Debug\_SCREEN_CAPTURE.FrmCapture.resources
............此处省略97个文件信息

评论

共有 条评论