How to set the height of the form more than 1096 pixels?

I am using C ++ Builder XE7 and have a weird problem. I need a shape height of about 1,500 pixels. The problem is that the object inspector does not allow me to specify a value that is larger than 1096 pixels. If I set any larger value, it is automatically set to 1096 .. The problem exists in any existing or new form. I am using Windows 7 with a resolution of 1920x1080.

+4
source share
1 answer

The reason for this behavior is that when you do not set limits on the size of the form, Delphi will automatically receive system-level restrictions through a message WM_GETMINMAXINFOthat starts when delphi sets the size of the form using a function SetWindowPos. For maximum height, Delphi uses the ptMaxTrackSize.Y element, which on my Windows 8.1 system is 1092 (resolution 1920x1080).

Therefore, if you want the height of the form to be higher than the height of the desktop of the system, you must use Constraints.MaxHeightto override this behavior. You can verify this by setting a breakpoint in the procedure TCustomForm.WMGetMinMaxInfoin the block Vcl.Forms.

+7
source

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


All Articles