You'll need to use GetWindowRect.
Just like shown in this example.
Then you can use Graphics.CopyFromScreen as shown in this SO post c# Take a screenshot of specific area.
Putting it all together, you call GetWindowRect, which accepts an HWnd to get the rect of the window you want. Then you use those rect values with CopyFromScreen to capture your image.