BorderStyle Property

See AlsoZ7PWKY

Applies To

Form14TJ2LN, grid2VGT0PT, image9A4FCA, label3MNIZ8D, lineTW530P, OLE control2HQDVVU, picture box31MYIWX, shape9JZFLA, text boxYPYZDG.

Description

Determines the border style for an object.  For forms and text boxes, read-only at run time.

Usage

[form.][control.]BorderStyle

Setting

The BorderStyle property settings for a form are:

Setting             Description

 

0                      None (no border or related border elements).

1                      Fixed Single.  Can include Control-menu box1LEPVNO, title bar32N908X, Maximize buttonBWJUIC, and Minimize buttonJMJUIC.  Resizable only using Maximize and Minimize buttons.

2                      (Default) Sizable.  Resizable using any of the optional border elements listed for setting 1.

3                      Fixed Double.  Can include Control-menu box and title bar; cannot include Maximize or Minimize buttons.  Not resizable.

 

The BorderStyle property settings for a grid, image, label, picture box, and text box are:

Setting             Description

 

0                      (Default for image and label) None.

1                      (Default for picture box and text box) Fixed Single.

 

The BorderStyle property settings for a line and a shape are:

Setting             Description

 

0                      Transparent.

1                      (Default) Solid.  The border is centered on the edge of the shape.

2                      Dash.

3                      Dot.

4                      Dash-Dot.

5                      Dash-Dot-Dot.

6                      Inside Solid.  The outer edge of the border is the outer edge of the shape.

 

The BorderStyle property settings for an OLE control are:

Setting             Description

 

0                      None.

1                      Fixed Single.

 

Remarks

For a form, the BorderStyle property determines key characteristics that visually identify a form as either a general-purpose window or a dialog box1OENUBI.  Setting 3 (Fixed Double) is useful for standard dialog boxes.

MDI child formsEXWLAX set to 2 (Sizable) will appear within the MDI form in a default size defined by the Windows environment at run time.  For any other setting, the form will appear in the size specified at design time.

 

Note   If a form with a menu is set to 3 (Fixed Double), it will appear with a setting 1 (Fixed Single) border instead.

At run time, a form is either modal1L0L9FR or modeless18PSOBN.  Use the Show2IF9Z3Q method to specify whether a form is modal or modeless.

 

Data Type

IntegerDOKXHY (Enumerated)


See Also

Help:

Caption PropertyF6ZZXB

ControlBox Property35ZQLA

DrawStyle Property4PNS0NQ

MaxButton Property117DCC7

MinButton Property1B9HLHD

 

Programmer's Guide:

Chapter 15, "Creating Graphics for Applications"