Esempio n. 1
0
        /// <summary>
        /// Apply mouseOverride on top of real cursor, which is set to blank.cur.
        /// </summary>
        private static void GrowMouse()
        {
            if (_stopwatch.ElapsedMilliseconds <= TRESHOLD_MILLI)
            {
                _mouse.Show();
                _mouse.Activate();
                _mouse.Left = _mousePosition.X - _mouse.ActualWidth / 2;
                _mouse.Top  = _mousePosition.Y - _mouse.ActualHeight / 2;
                AnimationUtil.ScaleUp(_mouse);

                foreach (var cursor in (uint[])Enum.GetValues(typeof(OCRCursors)))
                {
                    SetSystemCursor(LoadImage(IntPtr.Zero, _dummyMousePath, 2, 1, 1, 0x00000010), cursor);
                }

                _timer.Start();
            }

            _mouseMoves.Clear();
        }
Esempio n. 2
0
 /// <summary>
 /// Handle timer event.
 /// </summary>
 private static void TimerOnTick(object sender, EventArgs e)
 {
     AnimationUtil.ScaleDown(_mouse);
 }