I don't believe that is possible with standard Visual Studio Tools code. You will need to go low level to get the window in focus (as Tim says), then you can get the handle and the window title. However, getting back to technical name of the window itself will be difficult.
What are you trying to achieve? Understanding the bigger picture will help us suggest solutions.
David