How to prevent form resizing in Delphi?

How to prevent the resizing of my form? I don’t want it to be maximum (which can be switched using the property editor), but I don’t want anyone to be able to drag it. Am I missing something simple, or does it require a bit of coding?

I am using Delphi 2007.

+3
source share
6 answers

TForm has the property you need. Set

BorderStyle to bsSingle

so that the form does not seem significant, and it has the additional advantage of not , which can be significant. :-)

+16
source

You can set BorderStyle to bsDialog.

+3
source

TForm, MaxHeight, MinHeight, MaxWidth, MinWidth.

+3

BorderStyle bsSingle. , .

+1

And if you want to get really geeky (i.e. the answers above are better), you can intercept the RESIZE Windows message.

I myself would go with the Constraints property.

Greetings

+1
source

Set borderstyle to bstoolwindow. Windows will have only a close button and a title bar.

0
source

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


All Articles