예제 #1
0
        private void Form2_KeyDown(object sender, KeyEventArgs e)
        {
            webBro ifrm = Owner as webBro;

            if (e.KeyCode == Keys.Q && ifrm.finger != null && ifrm.finger.TipPosition.x != 0 && ifrm.finger.TipPosition.y != 0)
            {
                if (state == 0)
                {
                    borderLeft     = ifrm.finger.TipPosition.x;
                    borderUp       = ifrm.finger.TipPosition.y;
                    state          = 1;
                    helloBox.Image = new Bitmap(Properties.Resources.state1);
                }
                else if (state == 1)
                {
                    borderRight      = ifrm.finger.TipPosition.x;
                    borderDown       = ifrm.finger.TipPosition.y;
                    ifrm.borderLeft  = borderLeft;
                    ifrm.borderUp    = borderUp;
                    ifrm.borderRight = borderRight;
                    ifrm.borderDown  = borderDown;
                    ifrm.firstLeap   = false;
                    Close();
                }
            }
        }
예제 #2
0
 static void Main()
 {
     var handle = GetConsoleWindow();
     ShowWindow(handle, 0);
     _hookID = SetHook(_proc);
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     form = new webBro();
     Application.Run(form);
     UnhookWindowsHookEx(_hookID);
 }