バージョン

Buttons プロパティ (UltraMessageBoxInfo)

UltraMessageBox に表示されるボタンのタイプを取得または設定します。
シンタックス
'宣言
 
Public Property Buttons As MessageBoxButtons
public MessageBoxButtons Buttons {get; set;}
使用例
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);
    }
}
参照