Screenshot of a form larger than the screen

I have a TForm object whose height is greater than the required vertical resolution of my screen.

For some reason, Windows does not allow the visible (client) area of ​​the form to exceed the screen resolution, so vertical scroll bars appear in my form.

How to get a TBitmap image or a screenshot of the entire form (without visible scrollbars, all components of the form) so that all the contents of the form are visible?

+6
source share
1 answer

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.

+8
source

Source: https://habr.com/ru/post/916579/


All Articles