バージョン

ShowMessageBox メソッド

UltraMessageBox を表示します。
シンタックス
'宣言
 
Public Function ShowMessageBox( _
   ByVal messageBoxInfo As UltraMessageBoxInfo _
) As DialogResult
public DialogResult ShowMessageBox( 
   UltraMessageBoxInfo messageBoxInfo
)

パラメータ

messageBoxInfo
表示される単一 UltraMessageBoxInfo インスタンスに関する情報を含む UltraMessageBoxInfo オブジェクト。

戻り値の型

表示される UltraMessageBox の DialogResult を返します。
使用例
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);
    }
}
参照