WindowUtilities.GetForegroundWindow public static IntPtr GetForegroundWindow() See also:Class WindowUtilities