NotifyWinEvent

[DllImport("user32.dll", SetLastError = true)]
public static extern void NotifyWinEvent(
   uint eventMin,
   IntPtr hwnd,
   int idObject,
   int idChild
);

Microsoft documentation: Link

Last updated