Exemplo n.º 1
0
 private void _JiggleTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
 {
     if (this.tsmiGhost.Checked)
     {
         Jiggler.Jiggle(0, 0);
     }
     else if (!this.Reverse)
     {
         Jiggler.Jiggle(-4, -4);
     }
     else
     {
         Jiggler.Jiggle(4, 4);
     }
     this.Reverse = !this.Reverse;
 }
Exemplo n.º 2
0
        public static void Jiggle(int dx, int dy)
        {
            INPUT nPUT = new INPUT()
            {
                TYPE        = 0,
                dx          = dx,
                dy          = dy,
                mouseData   = 0,
                dwFlags     = 1,
                time        = 0,
                dwExtraInfo = (IntPtr)0
            };

            if (Jiggler.SendInput(1, ref nPUT, 28) != 1)
            {
                throw new Win32Exception();
            }
        }