Пример #1
0
        private void RequestMouseLeaveMessage(IntPtr hWnd)
        {
            // Crea the structure needed for WindowsAPI call
              TRACKMOUSEEVENTS tme = new TRACKMOUSEEVENTS();

              // Fill in the structure
              tme.cbSize = 16;
              tme.dwFlags = (uint) TrackerEventFlags.TME_LEAVE;
              tme.hWnd = hWnd;
              tme.dwHoverTime = 0;

              // Request that a message gets sent when mouse leaves this window
              WindowsAPI.TrackMouseEvent(ref tme);
        }
Пример #2
0
 public static extern bool TrackMouseEvent(ref TRACKMOUSEEVENTS tme);