| title | WindowsFormOptions |
|---|---|
| parent | WaynesForm |
| grand_parent | CustomControls Package |
| permalink | /tB/Packages/CustomControls/WaynesForm/WindowsFormOptions |
| has_toc | false |
{: .no_toc }
The Win32-frame settings of a WaynesForm --- border style, initial window state, startup position, taskbar visibility, and the title-bar buttons. Exposed as WaynesForm.WindowsOptions; a single instance per form, created automatically.
Most of the fields take effect once, when the form is first shown --- changing StartUpPosition or WindowState on a form that is already visible has no effect. The exception is the title-bar buttons; whether they have a visible effect depends on whether BorderStyle is one of the styles that include those buttons in the first place.
The type itself is Private Class --- the instance is accessed only through the form's WindowsOptions property, and a variable typed as WindowsFormOptions cannot be declared from outside the package.
Private Sub Form_Load()
With Me.WindowsOptions
.StartUpPosition = tbStartUpCenterScreen
.BorderStyle = tbFixedDialog
.MaximizeButton = False
.ShowInTaskbar = False
End With
End Sub
{: .no_toc }
The Win32 frame style --- thin / thick border, resizable / fixed, normal / tool-window title bar. A member of BorderStyle. Default: tbFixedSizable.
{: .no_toc }
Whether the form's title bar shows the system control box (the icon at the far left of the bar, with the Move / Close menu). Boolean. Default: True.
{: .no_toc }
Whether the title bar shows a Maximize button. Boolean. Default: True. Effective only when BorderStyle is one of the resizable styles.
{: .no_toc }
Whether the title bar shows a Minimize button. Boolean. Default: True. Effective only when BorderStyle is one of the styles that supports minimizing.
{: .no_toc }
Whether the form's window appears in the Windows taskbar. Boolean. Default: True.
{: .no_toc }
How the form's window is positioned when first shown. A member of StartupPosition. Default: tbStartUpWindowsDefault.
{: .no_toc }
The window state of the form when first shown --- normal, minimized, or maximized. A member of WindowState. Default: tbNormal.
{: .no_toc }
Raised whenever any of the seven fields is assigned. The parent WaynesForm listens for this event and (where applicable to a not-yet-shown form) re-applies the frame settings.