How to get window's position? [duplicate]
问题 This question already has an answer here: How to get and set the window position of another application in C# 4 answers 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; 回答1: Try this: [DllImport("user32.dll", CharSet = CharSet.Auto)] public static extern IntPtr FindWindow(string