Represents a window or dialog box that makes up an application's user interface.

A Form is a representation of any window displayed in your application. The Form class can be used to create standard, tool, borderless, and floating windows. You can also use the Form class to create modal windows such as a dialog box. A special kind of form, the multiple-document interface (MDI) form, can contain other forms called MDI child forms. An MDI form is created by setting the IsMdiContainer property to true. MDI child forms are created by setting the MdiParent property to the MDI parent form that will contain the child form.

Using the properties available in the Form class, you can determine the appearance, size, color, and window management features of the window or dialog box you are creating. The Text property allows you to specify the caption of the window in the title bar. The Size and Location properties allow you to define the size and position of the window when it is displayed. You can use the ForeColor color property to change the default foreground color of all controls placed on the form. The FormBorderStyle, MinimizeBox, and MaximizeBox properties allow you to control whether the form can be minimized, maximized, or resized at run time.

For a full list of properties, methods and events see the API documentation.



Similar to WinForms, the Form control acts as a container for any other Wisej control and is able to be manipulated in the designer to fit it's contents.

Modal Dialogs are used to demand an action from a user. They draw the user's attention away from other parts of the form and require the user to attend to an action.

A Form control can be shown as a modal dialog by calling the ShowDialog() method.

// create and show a modal form.
var form = new MyForm();
var result = form.ShowDialog();
if (result == DialogResult.OK)
// or

// create and dispose of a form upon completion.
using (var form = new MyForm())
    if (form.ShowDialog() == DialogResult.OK)

Modal dialogs are not disposed when closed. They are reusable. If you don't intend to reuse a modal dialog call Dispose() when closed or use the using pattern.

The Form can also be shown in a manner that simulates a modal-appearance without the modal functionality.

Simply set the ModalMask property to true and call the Form's Show() method.

An optional callback can be specified upon completion:

var form = new MyForm
    ShowModalMask = true
form.Show((form, result) => AlertBox.Show(result.ToString()));


JavaScript Widget


Class name


Theme appearance

"window", see Themes.

Child components

"captionbar", "title" is the title of the window, "icon" is the icon in the left top corner of the window, "minimize-button" is minimize button, "close-button" is the close button, "maximize-button" is the maximize button, "restore-button" is the restore button, "pane" is the content part of the window. See JavaScript.

Toolcontainer state

"caption", see Embedded Tools.

Source code

Last updated