BorderStyle

This property returns and sets the border style for a form or control.

Syntax

object.BorderStyle [= value]

Parameters

object
Object expression that evaluates to a control for a form.
value
Value or constant that determines the border style, as described in Settings. The following table shows the BorderStyle property settings for a Form object.
Constant
Setting
Description
vbBSNone 0 None (no border or border-related elements)
vbFixedSingle 1 Fixed single
vbSizable 2 Sizable (forms only)
vbFixedDialog 3 Fixed dialog (forms only)
vbFixedToolWindow 4 Fixed tool window
vbSizableToolWindow 5 Sizable tool window

The following table shows the BorderStyle property settings for the Label, Frame, PictureBox, and TextBox controls.
Setting
Description
0 None (default for Label controls)
1 Fixed single (default for TextBox)

The following table shows the BorderStyle property settings for Line and Shape controls.
Constant
Setting
Description
vbTransparent 0 Transparent
vbBSSolid 1 (default) Solid. The border is centered on the edge of the shape.
vbBSDash 2 Dash

Remarks

The BorderStyle property is read-only at run time for the Form object and the TextBox control.