Beispiel #1
0
        public override void SendMouseEvent(WindowsAPI.MOUSEEVENTF mouseevent, Point?location = null)
        {
            var click = new Point();

            if (location.HasValue)
            {
                click = location.Value;
            }
            else
            {
                // if not specified find middlepoint of this window/control
                var size = this.Size;
                click.X = size.Width / 2;
                click.Y = size.Height / 2;
            }
            var lparam = new IntPtr(WindowsAPI.MakeInt((short)click.X, (short)click.Y));

            WindowsAPI.PostMessage(this.Handle, (uint)mouseevent, new IntPtr(1), lparam);
        }
Beispiel #2
0
 /// <summary>
 /// Sends MouseEvent to the current Window/Child/Control
 /// </summary>
 /// <param name="mouseevent">MouseEvent to send (for now we take also on abstract layer the windows enum, this might be mapped for other OS.)</param>
 /// <param name="location"></param>
 public abstract void SendMouseEvent(WindowsAPI.MOUSEEVENTF mouseevent, Point?location = null);
Beispiel #3
0
 public override void SendMouseEvent(WindowsAPI.MOUSEEVENTF mouseevent, System.Drawing.Point? location = null) {
     throw new NotImplementedException();
 }