Displaying square root of 2 in dialog. : MessageBox « GUI « VB.Net Tutorial






Imports System.Windows.Forms ' Namespace containing MessageBox

Module modSquareRoot

   Sub Main()

      Dim root As Double = Math.Sqrt(2)

      MessageBox.Show("The square root of 2 is " & root, _
         "The Square Root of 2")

   End Sub 

End Module








14.60.MessageBox
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