Public Class Form1
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents btnShow As System.Windows.Forms.Button
    Friend WithEvents txtResult As System.Windows.Forms.TextBox
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.btnShow = New System.Windows.Forms.Button()
        Me.txtResult = New System.Windows.Forms.TextBox()
        Me.SuspendLayout()
        '
        'btnShow
        '
        Me.btnShow.Location = New System.Drawing.Point(16, 16)
        Me.btnShow.Name = "btnShow"
        Me.btnShow.TabIndex = 0
        Me.btnShow.Text = "Show"
        '
        'txtResult
        '
        Me.txtResult.Location = New System.Drawing.Point(112, 16)
        Me.txtResult.Name = "txtResult"
        Me.txtResult.Size = New System.Drawing.Size(120, 20)
        Me.txtResult.TabIndex = 1
        Me.txtResult.Text = " "
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(248, 61)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.txtResult, Me.btnShow})
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub btnShow_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShow.Click
        Dim intResult As Integer
        intResult = MessageBox.Show("The A drive is not ready." & _
           vbCrLf & vbCrLf & _
           "Please insert a diskette into the drive.", _
           "Device Not Ready", _
           MessageBoxButtons.AbortRetryIgnore, _
           MessageBoxIcon.Error, _
           MessageBoxDefaultButton.Button2)

        If intResult = DialogResult.Abort Then
            ' Do abort processing here...
            txtResult.Text = "Abort Clicked"
        ElseIf intResult = DialogResult.Retry Then
            ' Do retry processing here...
            txtResult.Text = "Retry Clicked"
        Else 'It has to be ignore
            ' Do ignore processing here...
            txtResult.Text = "Ignore Clicked"
        End If
    End Sub

End Class
