没有人知道,如果你可以使用.NET框架或通过pinvoking得到一个窗口的坐标?

我将具有的ProcessID或mainwindowhandle。

有帮助吗?

解决方案

HI时,可以使用 System.Windows.Forms.Control的CR = System.Windows.Forms.Control.FromHandle(System.Diagnostics.Process.GetCurrentProcess()MainWindowHandle); 现在u能获得该控件的位置。

其他提示

在Windows窗体API,form.Top和form.Left应该做的。

如果你已经是进程ID,您可以使用的 EnumWindowsProc 窗口API方法。一旦你的窗口的句柄,你想要的,你可以查询它的大小和位置。

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top