Version

Show(UltraMessageBoxInfo) Method

Displays an UltraMessageBox
Syntax
'Declaration
 
Public Overloads Shared Function Show( _
   ByVal messageBoxInfo As UltraMessageBoxInfo _
) As DialogResult
public static DialogResult Show( 
   UltraMessageBoxInfo messageBoxInfo
)

Parameters

messageBoxInfo
The UltraMessageBoxInfo object containing information about the single UltraMessageBox instance to be shown

Return Value

Returns the DialogResult of the shown UltraMessageBox
Example
The following code demonstrates using the Show() method using the UltraMessageBoxInfo object

Private Sub DisplayMessage(ByVal owner As IWin32Window, ByVal message As String, ByVal caption As String, ByVal buttons As MessageBoxButtons, ByVal icon As MessageBoxIcon, ByVal defaultButton As MessageBoxDefaultButton, _ 
ByVal helpFilePath As String, ByVal keyWord As String) 
    ' Create an UltraMessageBoxInfo and set all the appropriate properties 
    Using messageBoxInfo As New UltraMessageBoxInfo() 
        messageBoxInfo.TextFormatted = message 
        messageBoxInfo.Caption = caption 
        messageBoxInfo.Buttons = buttons 
        messageBoxInfo.Icon = icon 
        messageBoxInfo.DefaultButton = defaultButton 
        messageBoxInfo.EnableSounds = Infragistics.Win.DefaultableBoolean.[False] 
        messageBoxInfo.MaximumWidth = 700 
        messageBoxInfo.Owner = owner 
        messageBoxInfo.Style = MessageBoxStyle.Standard 
        messageBoxInfo.HeaderFormatted = "<i>Do you want to continue?</i>" 
        messageBoxInfo.FooterFormatted = "Link to <a href=""http://ko.infragistics.com""> Infragistics</a>." 
        messageBoxInfo.ShowHelpButton = Infragistics.Win.DefaultableBoolean.[True] 
        
        ' Create a HelpInfo object to hold the help data 
        Using helpData As New HelpInfo(helpFilePath, keyWord) 
            messageBoxInfo.HelpInfo = helpData 
            UltraMessageBoxManager.Show(messageBoxInfo) 
        End Using 
    End Using 
End Sub
private void DisplayMessage(IWin32Window owner, string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, string helpFilePath, string keyWord)
{
    // Create an UltraMessageBoxInfo and set all the appropriate properties
    using (UltraMessageBoxInfo messageBoxInfo = new UltraMessageBoxInfo())
    {
        messageBoxInfo.TextFormatted = message;
        messageBoxInfo.Caption = caption;
        messageBoxInfo.Buttons = buttons;
        messageBoxInfo.Icon = icon;
        messageBoxInfo.DefaultButton = defaultButton;
        messageBoxInfo.EnableSounds = Infragistics.Win.DefaultableBoolean.False;
        messageBoxInfo.MaximumWidth = 700;
        messageBoxInfo.Owner = owner;
        messageBoxInfo.Style = MessageBoxStyle.Standard;
        messageBoxInfo.HeaderFormatted = "<i>Do you want to continue?</i>";
        messageBoxInfo.FooterFormatted = "Link to <a href=\"http://ko.infragistics.com\"> Infragistics</a>.";
        messageBoxInfo.ShowHelpButton = Infragistics.Win.DefaultableBoolean.True;

        // Create a HelpInfo object to hold the help data
        using (HelpInfo helpData = new HelpInfo(helpFilePath, keyWord))
        {
            messageBoxInfo.HelpInfo = helpData;
            UltraMessageBoxManager.Show(messageBoxInfo);
        }
    }
}
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