messageBoxInfo.StartPosition = DialogStartPosition.CenterActiveScreen;
This topic demonstrates the usage of the StartPosition and StartLocation properties for the UltraMessageBoxInfo control.
The following topics are prerequisites to understanding this topic:
This topic contains the following sections:
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.
StartPosition determines the start position of the dialog from a set of predefined positions.
An example of setting the StartPosition in code behind.
In C#:
messageBoxInfo.StartPosition = DialogStartPosition.CenterActiveScreen;
In Visual Basic:
messageBoxInfo.StartPosition = DialogStartPosition.CenterActiveScreen
The StartLocation properties specifies the initial location of the message box when the StartPosition property is set to Manual.
StartLocation determines the specific point where the dialog will be displayed.
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)