Windows Form Properties in Visual Basic .NET
In this article, I will explain you about various properties of Windows Form in Visual Basic .NET.
Windows Form Properties
Below are the properties of a Windows Form.
Appearance Properties
|
Use
|
BackColor
|
Gets/Sets the background color for the form
|
BackgroundImage
|
Get/Sets the background image in the form
|
Cursor
|
Gets/Sets the cursor to be displayed when the user moves the mouse over the form
|
Font
|
Gets/Sets the font for the form
|
ForeColor
|
Gets/Sets the foreground color of the form
|
FormBorderStyle
|
Gets/Sets the border style of the form
|
RightToLeft
|
Gets/Sets the value indicating if the alignment of the control's elements is reversed to support right-to-left fonts
|
Text
|
Gets/Sets the text associated with this form
|
Behavior Properties
|
Use
|
AllowDrop
|
Indicates if the form can accept data that the user drags and drops into it
|
ContextMenu
|
Gets/Sets the shortcut menu for the form
|
Enabled
|
Gets/Sets a value indicating if the form is enabled
|
ImeMode
|
Gets/Sets the state of an Input Method Editor
|
Data Properties
|
Use
|
DataBindings
|
Gets the data bindings for a control
|
Tag
|
Gets/Sets an object that contains data about a control
|
Design Properties
|
Use
|
Name
|
Gets/Sets name for the form
|
DrawGrid
|
Indicates whether or not to draw the positioning grid
|
GridSize
|
Determines the size of the positioning grid
|
Locked
|
Gets/Sets whether the form is locked
|
SnapToGrid
|
Indicates if the controls should snap to the positioning grid
|
Layout Properties
|
Use
|
AutoScale
|
Indicates if the form adjusts its size to fit the height of the font used on the form and scales its controls
|
AutoScroll
|
Indicates if the form implements autoscrolling
|
AutoScrollMargin
|
The margin around controls during auto scroll
|
AutoScrollMinSize
|
The minimum logical size for the auto scroll region
|
DockPadding
|
Determines the size of the border for docked controls
|
Location
|
Gets/Sets the co-ordinates of the upper-left corner of the form
|
MaximumSize
|
The maximum size the form can be resized to
|
MinimumSize
|
The minimum size the form can be resized to
|
Size
|
Gets/Sets size of the form in pixels
|
StartPosition
|
Gets/Sets the starting position of the form at run time
|
WindowState
|
Gets/Sets the form's window state
|
Misc Properties
|
Use
|
AcceptButton
|
Gets/Sets the button on the form that is pressed when the user uses the enter key
|
CancelButton
|
Indicates the button control that is pressed when the user presses the ESC key
|
KeyPreview
|
Determines whether keyboard controls on the form are registered with the form
|
Language
|
Indicates the current localizable language
|
Localizable
|
Determines if localizable code will be generated for this object
|
Window Style Properties
|
Use
|
ControlBox
|
Gets/Sets a value indicating if a control box is displayed
|
HelpButton
|
Determines whether a form has a help button on the caption bar
|
Icon
|
Gets/Sets the icon for the form
|
IsMdiContainer
|
Gets/Sets a value indicating if the form is a container for MDI child forms
|
MaximizeBox
|
Gets/Sets a value indicating if the maximize button is displayed in the caption bar of the form
|
Menu
|
Gets/Sets the MainMenu that is displayed in the form
|
MinimizeBox
|
Gets/Sets a value indicating if the minimize button is displayed in the caption bar of the form
|
Opacity
|
Determines how opaque or transparent the form is
|
ShowInTaskbar
|
Gets/Sets a value indicating if the form is displayed in the Windows taskbar
|
SizeGripStyle
|
Determines when the size grip will be displayed for the form
|
TopMost
|
Gets/Sets a value indicating if the form should be displayed as the topmost form of the application
|
TransparencyKey
|
A color which will appear transparent when painted on the form
|
Summary
I hope this article help you to understand about various properties of Windows Form in Visual Basic .NET.