void RequestMouseLeaveMessage(IntPtr hWnd) { // Crea the structure needed for WindowsAPI call Win32.TRACKMOUSEEVENTS tme = new Win32.TRACKMOUSEEVENTS(); // Fill in the structure tme.cbSize = 16; tme.dwFlags = (uint)Win32.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);