private static void ResetHover(Control targetControl) { if (targetControl == null) { return; } TRACKMOUSEEVENT eventTrack = new TRACKMOUSEEVENT(); eventTrack.dwFlags = WinUser.TME_QUERY; eventTrack.hwndTrack = targetControl.Handle.ToInt32(); eventTrack.cbSize = Marshal.SizeOf(eventTrack); User32.TrackMouseEvent(ref eventTrack); eventTrack.dwFlags |= WinUser.TME_HOVER; User32.TrackMouseEvent(ref eventTrack); }
public static extern Boolean TrackMouseEvent(ref TRACKMOUSEEVENT eventTrack);
public static extern bool TrackMouseEvent(ref TRACKMOUSEEVENT eventTrack);