ExForm
ExForm is a Form with the caption colors, corners and backdrop of Windows 11, a dark caption on Windows 10 and, with
an ExTitleBar, a custom title bar that hosts the main menu.
Caption and frame
| Property | Description | Windows |
|---|---|---|
DarkTitleBar |
Dark system caption. TitleBarBackColor takes precedence. |
10 and newer |
TitleBarBackColor, TitleBarForeColor |
Colors of the caption, empty restores the system colors. The custom title bar uses them too. | 11 (custom title bar 10) |
TitleBarBorderColor |
Color of the window border. | 11 |
CornersType |
Round, SmallRound or Rectangular corners (FormCornersType). |
11 |
FormStyle |
System backdrop of the window: Mica, Acrylic or Tabbed (FormStyle). Only in the system caption. |
11 |
FormStyle.Auto (default) keeps the caption a plain Form has; FormStyle.Default turns the backdrop off, which makes
the active caption black in dark mode.
Custom title bar
An ExTitleBar among the direct children of the form replaces the system caption. TitleBar returns it and
UsesCustomTitleBar tells whether the form really shows it, which needs Windows 10 and a FormBorderStyle other than
None. See Custom title bar.
Composited painting
UseCompositedPainting (on by default) paints the whole form double buffered with WS_EX_COMPOSITED, which reduces
flicker when resizing. Some controls repaint endlessly in such a window, such as an empty TextBox with
PlaceholderText; use ExTextBox with HintText or turn composited painting off.
Theme
ExThemer.Apply(form.Controls, theme) styles the controls of the form, not the form itself. Set its BackColor,
ForeColor and DarkTitleBar after applying the theme, see Getting started.


