Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Screenshot of form whose dimensions are greater than screen dimensions

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

For some reason, Windows doesn't allow the visible (client?) area of the form to exceed the screen resolution, so vertical scrollbars appear on my form.

How would I get a TBitmap image or screenshot of the entire form (no scrollbars, all form components visible) so that all content of the form is visible?

like image 935
ardnew Avatar asked May 24 '12 15:05

ardnew


1 Answers

At first you have to make sure the form has no scrollbars. For that you can write an event handler for FormConstrainedResize and adjust MaxWidth and MaxHeight to your needs. If the form size is restricted during design, set the required Width and Height in the FormCreate event to the desired values.

Now you can use GetFormImage to get the screenshot.

like image 157
Uwe Raabe Avatar answered Oct 05 '22 20:10

Uwe Raabe