Version

Setting up the StartPosition and StartLocation properties

Topic Overview

Purpose

This topic demonstrates the usage of the StartPosition and StartLocation properties for the UltraMessageBoxInfo control.

Required Background

The following topics are prerequisites to understanding this topic:

Topic Purpose

Contains a tutorial that demonstrates the basic use of the UltraMessageBoxInfo.

StartPosition

Overview

The StartPosition property specifies the initial position of the dialog from a set of predefined positions (DialogStartPosition Enumeration). If the property is set to DialogStartPosition.Manual, then the location of the UltraMessageBoxManager is determined by the StartLocation property.

StartPosition properties exist on the UltraMessageBoxInfo and UltraMessageBoxManager classes, allowing the position to be set for all message boxes associated with the instance of the WinMessageBoxManager, or on a per UltraMessageBox basis.

Specifies start up position of the dialog

StartPosition determines the start position of the dialog from a set of predefined positions.

Property Name Property Type Description

StartPosition

DialogStartPosition

Specify the initial position of the dialog.

If the enumeration is set to Manual, then the location of the form is determined by the StartLocation property.

Example

An example of setting the StartPosition in code behind.

In C#:

messageBoxInfo.StartPosition = DialogStartPosition.CenterActiveScreen;

In Visual Basic:

messageBoxInfo.StartPosition = DialogStartPosition.CenterActiveScreen

StartLocation

Overview

The StartLocation properties specifies the initial location of the message box when the StartPosition property is set to Manual.

Specifies start up location of the dialog

StartLocation determines the specific point where the dialog will be displayed.

Property Name Property Type Description

StartLocation

Point

Specifies the initial location of the message box.

This value is taken under consideration only when StartPosition property is set to Manual.

Example

An example of setting the StartLocation in code behind.

In C#:

messageBoxInfo.StartPosition = DialogStartPosition.Manual;messageBoxInfo.StartLocation = new Point(500, 300);

In Visual Basic:

messageBoxInfo.StartPosition = DialogStartPosition.ManualmessageBoxInfo.StartLocation = new Point(500, 300)