I am able to get the window handle value of an application and to capture the whole window. but I need to capture only client rectangle of that Form/Window, so I need respective instance from the handle (either it is form or window).
Does anyone know how to achieve this?
Process[] p = Process.GetProcessesByName(fileName);
IntPtr handle = p[0].MainWindowHandle;