Properties
| AcceptButton | Gets or sets the button on the form that is clicked when the user presses the ENTER key. |
| CancelButton | Gets or sets the button control that is clicked when the user presses the ESC key. |
| FormBorderStyle (see below) | Gets or sets the border style of the form. |
| MaximiseBox = False | Gets or sets a value indicating whether the maximize button is displayed in the caption bar of the form. |
| MinimiseBox = False | Gets or sets a value indicating whether the minimize button is displayed in the caption bar of the form. |
| ShowInTaskBar = False | Gets or sets a value indicating whether the form is displayed in the Windows taskbar. |
| SizeGridStyle = Hide | Gets or sets the style of the size grip to display in the lower-right corner of the form. |
| StartPosition = CenterParent | Gets or sets the starting position of the form at run time. |
| Text = "dialog name" | Gets or sets the text associated with this control. |
| WindowState |
How to detect if a form has been closed - on a different thread ??
FormBorderStyle
Represents the style of border to display. The default is Sizeable
Fixed refers to a fixed size (ie not resizeable)
| Option | Description |
| None | (0) No border (rarely used) |
| FixedSingle | (1) A fixed, single line border |
| Fixed3D | (2) A fixed, three-dimensional border |
| FixedDialog | (3) A fixed, thick border |
| Sizeable | (4) (default) |
| FixedToolWindow | (5) (not resizeable) Only has a close button |
| SizeableToolWindow | (6) |
Hide from StartBar
You can prevent a windows form appearing on the taskbar by setting
Me.ShowInTaskbar = False
Hide from Alt + Tab
You can prevent a windows form appearing in the Alt + Tab dialog box by defining your form to be a Tool window
Me.FormBorderStyle = FixedToolWIndow
Me.FormBorderStyle = SizeableToolWIndow
and
Me.ShowInTaskbar = False
Hide Borderless from Alt + Tab
If you want the form not to have a border and for it not to appear in the Alt + Tab dialog box
Me.FormBorderStyle = FixedToolWIndow
Me.FormBorderStyle = SizeableToolWIndow
and also add the following code to your derived class
Protected Overloads Overrides ReadOnly Property CreateParams() As CreateParams
Get
Dim cp As CreateParams = MyBase.CreateParams
cp.ExStyle = cpExStyle Or &H80
return cp
End Get
End Property
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext