Well...yes, it will.
There are two problems here. The first is that in order for you application to be activated by a key to find out which window is on top, it has to have the input focus. which means...it's on top...:laugh:
Secondly, if you look at the documentation for
Process.GetCurrentProcess Method (System.Diagnostics)[
^] it returns a process associated withteh currently executing code: i.e. the code that is trying to find out which process is tip most - this will always be your application!
Pretty much, you can't do what you want - though the link will show you how to get all processes on your system - unless you can install a Global Hook which can trap out the key at a level much, much higher than your application. While this can be done (
Processing Global Mouse and Keyboard Hooks in C#[
^] shows how) it's not something for a beginner to attempt - mistakes can leave your system seriously unstable!