[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Forms' (#lcl)

# TCustomForm.BorderStyle

The border style affects the title bar, border, icon(s), and resize behavior for the form.

## Declaration

Source position: forms.pp line 770

`public property TCustomForm.BorderStyle : TFormBorderStyle read FFormBorderStyle write SetFormBorderStyle default bsSizeable;`

## Description

BorderStyle is a TFormBorderStyle property used to control the appearance of the border on a form. The default value is bsSizeable and displays the standard border for a sizeable window. But it could, for example, be a dialog form or a tool window, or could be non-sizeable. See TFormBorderStyle for the enumeration values allowed in the property and their meanings.

Changing the value for the property causes other properties in the form instance to be updated:

AutoScroll
  Disabled when the property contains a value other than bsSizeable or bsSizeToolWin.
BorderIcons
  Updated at run-time when the new property value requires a different set of default border icons than the previous value.
Icon, SmallIconHandle, BigIconHandle
  Updated at run-time by performing the CM_ICONCHANGED control message.
Menu
  Updated at run-time to create (or re-create) the window handle for a TMainMenu instance using the Handle for the form.

In TCustomForm (and TForm), BorderStyle is slightly different (has a different base type) from the TCustomControl.BorderStyle property. When the form is put into another control the window borders depend on the widgetset. There are no borders under GTK.

## See also

TCustomForm.AutoScroll |  | Indicates if the form can automatically show or hide scroll bars.
TCustomForm.Icon |  | The Icon associated with this Form (in minimized state).
TCustomForm.SmallIconHandle |  | Returns (and optionally creates) the Handle for the small Icon used for the form.
TCustomForm.BigIconHandle |  | Returns the handle for the large icon on the form or in the application.
TCustomForm.CMIconChanged |  | Handles the CM_ICONCHANGED control message for the form.
TCustomForm.Menu |  | The main menu for the form instance.
TFormBorderStyle |  | Represents border styles available for a Form.
TBorderStyle |  | Possible types of borders (with or without border).
TCustomControl.BorderStyle |  | Indicates the border style displayed around the control.