Return value from MessageBox : MessageBox « GUI « VB.Net Tutorial

Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms

public class MessageBoxReturnValue
   public Shared Sub Main
        Dim intReturnValue As Integer
        intReturnValue = MessageBox.Show("This is also a message box!", "Message Box", _
            MessageBoxButtons.OKCancel, MessageBoxIcon.Information, _
            MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly)
        If (intReturnValue = DialogResult.OK) Then
            Console.WriteLine("You clicked the OK button.")
        End If
   End Sub
End class

14.60.1.MessageBox with Message onlyMessageBox with Message only
14.60.2.MessageBox with Message and TitleMessageBox with Message and Title
14.60.3.MessageBox with OK, Cancel button and InformationMessageBox with OK, Cancel button and Information
14.60.4.MessageBox with Yes No Cancel button and Question iconMessageBox with Yes No Cancel button and Question icon
14.60.5.MessageBox OK and Cancel ButtonMessageBox OK and Cancel Button
14.60.6.MessageBox: Abort, Retry, Ignore buttons and Warning iconMessageBox: Abort, Retry, Ignore buttons and Warning icon
14.60.7.Set default button for MessageBoxSet default button for MessageBox
14.60.8.Displaying square root of 2 in dialog.
14.60.9.Return value from MessageBox
14.60.10.MessageBox Icon and ButtonMessageBox Icon and Button
14.60.11.Custom your MessageBoxCustom your MessageBox
14.60.12.Create MessageBox dynamicallyCreate MessageBox dynamically