First you need to make sure that there are no scroll bars in the form. To do this, you can write an event handler for FormConstrainedResize and customize MaxWidth and MaxHeight to suit your needs. If the size of the form is limited during design, set the required width and height in the FormCreate event for the desired values.
Now you can use GetFormImage to take a screenshot.
source share