C# detect application(s) below cursor
So, I'm wondering if anyone can help me out here. Using Visual C# and .NET 3.5 SP1, I'm trying to find a way to detect the window below the mouse cursor.
If you had Notepad, IE, and Word all open, and all covering each other (or just cascaded, using the standard Windows function), I'd like to be able to detect the application directly below the mouse cursor, as well as the one below that.
Is this possible with all-managed code, or should I just move to Visual C++/MFC?