Hi, does anyone know if you can get the coordinates of a window using the .NET framework or via pinvoking?
I would have the processID or mainwindowhandle.
Hi, does anyone know if you can get the coordinates of a window using the .NET framework or via pinvoking?
I would have the processID or mainwindowhandle.
In Windows Forms API, form.Top and form.Left should do.
If all you have is the process Id, you can iterate through the process's widows using EnumWindowsProc windows API method. once you get the window's handle which you want, you can query for its size and position.
HI, you can use System.Windows.Forms.Control cr= System.Windows.Forms.Control.FromHandle(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle); now u can get location of that control.