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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With