资源简介

设置好保存目录,间隔时间后,可以自动截屏并保存,支持快捷键 C#,VS2008工程

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using KoalaStudio.BookshopManager;
namespace AutoCaputureForm
{
    public partial class Form1 : Form
    {
        private bool isStart = false;
        private int count = 1;
        public Form1()
        {
            InitializeComponent();
        }
        
        protected override void WndProc(ref Message m)
        {
            const int WM_HOTKEY = 0x0312;
            //按快捷键
           
            switch (m.Msg)
            {
                case WM_HOTKEY:
                    switch (m.WParam.ToInt32())
                    {
                        case 100:    //按下的是Shift+S
                            //此处填写快捷键响应代码
                            Console.WriteLine(100);
                            break;
                        case 101:    //按下的是Ctrl+B
                            //此处填写快捷键响应代码
                         
                            screenCapture();
                            break;
                        case 102:    //按下的是Alt+D
                            //此处填写快捷键响应代码
                            break;
                    }
                    break;
            }
            base.WndProc(ref m);
        }
        private void Form1_Load(object sender EventArgs e)
        {
            checkBox1.Checked = true;
            timerSpan.Text = “20“;
            savePath.Text = “i:\\“;
            shortCut.Text = “PrintScreen“;
            shortCut.Enabled = false;
            HotKey.RegisterHotKey(Handle 101 HotKey.KeyModifiers.None Keys.PrintScreen);
        }

        private void label1_Click(object sender EventArgs e)
        {

        }

        private void button2_Click(object sender EventArgs e)
        {

            if (folderBrowserDialog1.ShowDialog() == DialogResult.OK)
            {


                savePath.Text = folderBrowserDialog1.SelectedPath;

            }
        }

        private void checkBox1_CheckedChanged(object sender EventArgs e)
        {
            if (!checkBox1.Checked)
            {

                timerSpan.Enabled = false;
            }
            else {
                timerSpan.Enabled = true;
            }

        }

        private void textBox2_KeyDown(object sender KeyEventArgs e)
        {
            
            shortCut.Text = ““;
            if (e.Control)
                shortCut.Text += “CTRL + “;
            if (e.Alt)
                shortCut.Text += “ALT + “;
            if (e.Shift)
                shortCut.Text += “SHIFT + “;
            
            shortCut.Text += e.KeyCode.ToString();
            e.Handled = true;
        }

        private void shortCut_KeyPress(object sender KeyPressEventArgs e)
        {
            e.Handled = true;
        }

        priva

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       3780  2011-10-01 13:36  AutoCaputureForm\AutoCaputureForm.csproj

     文件       1481  2011-10-01 12:44  AutoCaputureForm\AutoCaputureForm.idc

     文件      13312  2011-10-01 14:07  AutoCaputureForm\bin\Debug\AutoCaputureForm.exe

     文件      30208  2011-10-01 14:07  AutoCaputureForm\bin\Debug\AutoCaputureForm.pdb

     文件      14328  2011-10-01 14:07  AutoCaputureForm\bin\Debug\AutoCaputureForm.vshost.exe

     文件        490  2009-06-11 05:14  AutoCaputureForm\bin\Debug\AutoCaputureForm.vshost.exe.manifest

     文件      12800  2011-10-01 14:08  AutoCaputureForm\bin\Release\AutoCaputureForm.exe

     文件      28160  2011-10-01 14:08  AutoCaputureForm\bin\Release\AutoCaputureForm.pdb

     文件      14328  2011-10-01 14:08  AutoCaputureForm\bin\Release\AutoCaputureForm.vshost.exe

     文件        490  2009-06-11 05:14  AutoCaputureForm\bin\Release\AutoCaputureForm.vshost.exe.manifest

     文件       5095  2011-10-01 14:08  AutoCaputureForm\Form1.cs

     文件       7439  2011-10-01 13:51  AutoCaputureForm\Form1.Designer.cs

     文件       6217  2011-10-01 13:51  AutoCaputureForm\Form1.resx

     文件       1438  2011-10-01 13:36  AutoCaputureForm\HotKey.cs

     文件       1091  2011-10-01 14:07  AutoCaputureForm\obj\Debug\AutoCaputureForm.csproj.FileListAbsolute.txt

     文件        847  2011-10-01 13:51  AutoCaputureForm\obj\Debug\AutoCaputureForm.csproj.GenerateResource.Cache

     文件      13312  2011-10-01 14:07  AutoCaputureForm\obj\Debug\AutoCaputureForm.exe

     文件        180  2011-10-01 13:51  AutoCaputureForm\obj\Debug\AutoCaputureForm.Form1.resources

     文件      30208  2011-10-01 14:07  AutoCaputureForm\obj\Debug\AutoCaputureForm.pdb

     文件        180  2011-10-01 13:36  AutoCaputureForm\obj\Debug\AutoCaputureForm.Properties.Resources.resources

     文件       1107  2011-10-01 14:08  AutoCaputureForm\obj\Release\AutoCaputureForm.csproj.FileListAbsolute.txt

     文件        847  2011-10-01 14:08  AutoCaputureForm\obj\Release\AutoCaputureForm.csproj.GenerateResource.Cache

     文件      12800  2011-10-01 14:08  AutoCaputureForm\obj\Release\AutoCaputureForm.exe

     文件        180  2011-10-01 14:08  AutoCaputureForm\obj\Release\AutoCaputureForm.Form1.resources

     文件      28160  2011-10-01 14:08  AutoCaputureForm\obj\Release\AutoCaputureForm.pdb

     文件        180  2011-10-01 14:08  AutoCaputureForm\obj\Release\AutoCaputureForm.Properties.Resources.resources

     文件        508  2011-10-01 12:43  AutoCaputureForm\Program.cs

     文件       1444  2011-10-01 12:43  AutoCaputureForm\Properties\AssemblyInfo.cs

     文件       2861  2011-10-01 12:43  AutoCaputureForm\Properties\Resources.Designer.cs

     文件       5612  2011-10-01 12:43  AutoCaputureForm\Properties\Resources.resx

............此处省略18个文件信息

评论

共有 条评论