This question already has an answer here:
I'd like to know the way of getting process'es window position. I've been looking for that on the internet but with no results. Thanks :)
Process[] processes = Process.GetProcessesByName("notepad");
Process lol = processes[0];
IntPtr p = lol.MainWindowHandle;
Try this: