Version

Caption Property (UltraMessageBoxInfo)

Gets or sets the text to be displayed in the caption of the UltraMessageBox
Syntax
'Declaration
 
Public Property Caption As String
public string Caption {get; set;}
Example
The following code demonstrates how to create a UltraMessageBoxInfo object and use it to display an UltraMessageBox

Private Sub ShowContinueMessage(ByVal message As String) 
    Using ultraMessageBoxInfo As New UltraMessageBoxInfo() 
        ' Set the general display style 
        ultraMessageBoxInfo.Style = MessageBoxStyle.Vista 
        
        ' Set the text for the Text, Caption, Header and Footer 
        ultraMessageBoxInfo.Text = message 
        ultraMessageBoxInfo.Caption = "Continue?" 
        ultraMessageBoxInfo.Header = "Would you like to continue" 
        ultraMessageBoxInfo.Footer = "Continuing without restarting can produce unpredictable behaviors." 
        
        ' Specify which buttons should be used and which is the default button 
        ultraMessageBoxInfo.Buttons = MessageBoxButtons.AbortRetryIgnore 
        ultraMessageBoxInfo.DefaultButton = MessageBoxDefaultButton.Button2 
        ultraMessageBoxInfo.ShowHelpButton = Infragistics.Win.DefaultableBoolean.[False] 
        
        ' Display the OS Error Icon 
        ultraMessageBoxInfo.Icon = MessageBoxIcon.[Error] 
        
        ' Disable the default sounds 
        ultraMessageBoxInfo.EnableSounds = Infragistics.Win.DefaultableBoolean.[False] 
        
        
        ' Show the UltraMessageBox 
        Me.ultraMessageBoxManager1.ShowMessageBox(ultraMessageBoxInfo) 
    End Using 
End Sub
private void ShowContinueMessage(string message)
{
    using (UltraMessageBoxInfo ultraMessageBoxInfo = new UltraMessageBoxInfo())
    {
        // Set the general display style
        ultraMessageBoxInfo.Style = MessageBoxStyle.Vista;

        // Set the text for the Text, Caption, Header and Footer
        ultraMessageBoxInfo.Text = message;
        ultraMessageBoxInfo.Caption = "Continue?";
        ultraMessageBoxInfo.Header = "Would you like to continue";
        ultraMessageBoxInfo.Footer = "Continuing without restarting can produce unpredictable behaviors.";

        // Specify which buttons should be used and which is the default button
        ultraMessageBoxInfo.Buttons = MessageBoxButtons.AbortRetryIgnore;
        ultraMessageBoxInfo.DefaultButton = MessageBoxDefaultButton.Button2;
        ultraMessageBoxInfo.ShowHelpButton = Infragistics.Win.DefaultableBoolean.False;

        // Display the OS Error Icon
        ultraMessageBoxInfo.Icon = MessageBoxIcon.Error;

        // Disable the default sounds
        ultraMessageBoxInfo.EnableSounds = Infragistics.Win.DefaultableBoolean.False;


        // Show the UltraMessageBox
        this.ultraMessageBoxManager1.ShowMessageBox(ultraMessageBoxInfo);
    }
}
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also