![]() ![]() | ||
Forms usually come with minimizing and maximizing buttons, as well as a close box at upper right. However, that's not appropriate in all cases, as we'll see when we design dialog boxes later in this chapter. To remove these buttons, you can set the form's ControlBox property to False. You can also remove the minimizing and maximizing buttons independently, with the MaximizeBox and MinimizeBox properties.
Tip |
If you are thinking of designing a dialog box, take a look at our dialog box material later in this chapter—besides removing the control box, you should also set the dialog's border correctly, add OK and Cancel buttons, and take care of a few more considerations. |
You also can set what buttons are in a form by setting its border type—for example, if you set the border style to a fixed type, the minimizing and maximizing buttons will disappear.
You set a form's border style with its FormBorderStyle property; here are the possible values for that property:
Fixed3D— A fixed, three-dimensional border.
FixedDialog— A thick, fixed dialog-style border.
FixedSingle— A fixed, single-line border.
FixedToolWindow— A tool window border that is not resizable.
None— No border.
Sizable— A resizable border.
SizableToolWindow— A resizable tool window border.
We'll see more about using the FormBorderStyle property when we work with dialog boxes later in this chapter.
![]() ![]() | ||