⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form2.cs

📁 这个程序主要是用于MOUSE测试,可以先试一试
💻 CS
📖 第 1 页 / 共 3 页
字号:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using System.Runtime.InteropServices;


namespace WindowsApplication1
{
    public partial class Form2 : Form
    {
        
        int i = 0; Thread ph;
        
        
        public Form2()
        {
            InitializeComponent();
            
        
        }
        
       
        private void Form1_KeyDown(object sender, KeyEventArgs e)
        {

            
           
           

        }

        
        protected override bool ProcessCmdKey(ref Message msg, Keys e) 
                {
                    const int WM_KEYDOWN = 0x100;
                    const int WM_SYSKEYDOWN = 0X104;
                    if ((msg.Msg == WM_KEYDOWN)||(msg.Msg==WM_SYSKEYDOWN))
               {

                   if (e == Keys.Escape)
                   {
                       if (!button1.BackColor.Equals(Color.Yellow))
                       {
                           this.button1.BackColor = Color.Yellow;
                           ++i;
                       }
                   }

                        if   (e == Keys.Up ) 
                        {
                            if (!button74.BackColor.Equals(Color.Yellow))
                            {
                                button74.BackColor = Color.Yellow;
                                ++i;
                               
                            }
                        }
                        if (e == Keys.Down)
                        {
                            if (!button85.BackColor.Equals(Color.Yellow))
                            {
                                button85.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.Left)
                        {
                            if (!button84.BackColor.Equals(Color.Yellow))
                            {
                                button84.BackColor = Color.Yellow;
                                ++i;
                            }
                            }
                        if (e == Keys.Right)
                        {
                            if (!button86.BackColor.Equals(Color.Yellow))
                            {
                                button86.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.F1)
                        {
                            if (!button2.BackColor.Equals(Color.Yellow))
                            {
                                this.button2.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.F2)
                        {
                            if (!button3.BackColor.Equals(Color.Yellow))
                            {
                                this.button3.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.F3)
                        {
                            if (!button4.BackColor.Equals(Color.Yellow))
                            {

                                this.button4.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.F4)
                        {
                            if (!button5.BackColor.Equals(Color.Yellow))
                            {
                                this.button5.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.F5)
                        {
                            if (!button6.BackColor.Equals(Color.Yellow))
                            {
                                this.button6.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.F6)
                        {
                            if (!button7.BackColor.Equals(Color.Yellow))
                            {
                                this.button7.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.F7)
                        {
                            if (!button8.BackColor.Equals(Color.Yellow))
                            {
                                this.button8.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.F8)
                        {
                            if (!button9.BackColor.Equals(Color.Yellow))
                            {
                                this.button9.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.F9)
                        {
                            if (!button10.BackColor.Equals(Color.Yellow))
                            {
                                this.button10.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.F10)
                        {
                            if (!button11.BackColor.Equals(Color.Yellow))
                            {
                                this.button11.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.F11)
                        {
                            if (!button12.BackColor.Equals(Color.Yellow))
                            {
                                this.button12.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.F12)
                        {
                            if (!button13.BackColor.Equals(Color.Yellow))
                            {
                                this.button13.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.NumLock)
                        {
                            if (!button14.BackColor.Equals(Color.Yellow))
                            {
                                this.button14.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.Insert)
                        {
                            if (!button15.BackColor.Equals(Color.Yellow))
                            {
                                this.button15.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.Delete)
                        {
                            if (!button16.BackColor.Equals(Color.Yellow))
                            {
                                this.button16.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.Pause)
                        {
                            if (!button17.BackColor.Equals(Color.Yellow))
                            {
                                this.button17.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.Oemtilde)
                        {
                            if (!button18.BackColor.Equals(Color.Yellow))
                            {
                                this.button18.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.D1)
                        {
                            if (!button19.BackColor.Equals(Color.Yellow))
                            {
                                this.button19.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.D2)
                        {
                            if (!button20.BackColor.Equals(Color.Yellow))
                            {
                                this.button20.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.D3)
                        {
                            if (!button21.BackColor.Equals(Color.Yellow))
                            {
                                this.button21.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.D4)
                        {
                            if (!button22.BackColor.Equals(Color.Yellow))
                            {
                                this.button22.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.D5)
                        {
                            if (!button23.BackColor.Equals(Color.Yellow))
                            {
                                this.button23.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.D6)
                        {
                            if (!button24.BackColor.Equals(Color.Yellow))
                            {
                                this.button24.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.D7)
                        {
                            if (!button25.BackColor.Equals(Color.Yellow))
                            {
                                this.button25.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.D8)
                        {
                            if (!button26.BackColor.Equals(Color.Yellow))
                            {
                                this.button26.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.D9)
                        {
                            if (!button27.BackColor.Equals(Color.Yellow))
                            {
                                this.button27.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.D0)
                        {
                            if (!button28.BackColor.Equals(Color.Yellow))
                            {
                                this.button28.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.OemMinus)
                        {
                            if (!button29.BackColor.Equals(Color.Yellow))
                            {
                                this.button29.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.Oemplus)
                        {
                            if (!button30.BackColor.Equals(Color.Yellow))
                            {
                                this.button30.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.Back)
                        {
                            if (!button31.BackColor.Equals(Color.Yellow))
                            {
                                this.button31.BackColor = Color.Yellow;
                                ++i;
                            }
                        }
                        if (e == Keys.Home)
                        {
                            if (!button32.BackColor.Equals(Color.Yellow))
                            {
                                this.button32.BackColor = Color.Yellow;
                                ++i;
                            }
                           
                        }
                        
                        if (e == Keys.Tab)
                        {
                            if (!button33.BackColor.Equals(Color.Yellow))
                            {
                                this.button33.BackColor = Color.Yellow;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -