[DllImport("user32.dll")] public static extern IntPtr GetForegroundWindow( );
Microsoft documentation: Linkarrow-up-right
Last updated 2 years ago