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); }
public static extern bool TrackMouseEvent(ref TRACKMOUSEEVENTS tme);