Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set form height larger than 1096 pixels?

I am using C++ Builder XE7 and having a strange problem. I need a form height to be about 1500 pixels. The problem is that object inspector does not allow me to specify value that is larger then 1096 pixels. If I set any larger value it is automatically set to 1096.. The problem exists on any existing or new form. I'm using Windows 7 with screen resolution 1920x1080.

like image 703
Tracer Avatar asked Feb 23 '16 12:02

Tracer


1 Answers

The reason for this behavior is that when you do not set constraints for the form size, Delphi will automatically get constraints at system level via the WM_GETMINMAXINFO message, which is fired when delphi sets the form size via the SetWindowPos function. For the maximum height, Delphi uses the ptMaxTrackSize.Y member which happens to be 1092 on my windows 8.1 system (1920x1080 resolution).

So if you want to force form heights higher than the system desktop height, you must use Constraints.MaxHeight to override this behavior. You can check this out by setting a breakpoint in procedure TCustomForm.WMGetMinMaxInfo in the Vcl.Forms unit.

like image 185
whosrdaddy Avatar answered Nov 07 '22 21:11

whosrdaddy