29 Jun '15

Anupa Manipal

A professional Software Developer in VB.NET - SQL Server and learner of PHP. Expertise in implementation of various projects including designing, development, coding and implementation of software applications.

0 Shares

Message Box in VB .NET

Message Box in VB .NET

Message Box in VB .NET – Working with messagebox is a very interesting topic for beginners. The message box which displays dialog box in VB.NET.  It is used to display a error messages, notification, etc. This tutorial helps you to learn main features of message box. In the example we created program of simple messagebox, Message box with title, dialog box with buttons, dialog box with icons, and dialog box with if else condition.


Message Box in VB .NET

Basic Syntax: MessageBox.Show(message, title, controls, icon)


Source Code:


Example 1: In the example 1 just it displays message in the content bar and default OK button comes under this.

messagebox example with message


Example 2: In this example The dialog box appears with message and title in the top.

messagebox example with message and title


Example 3: This is 3 argument dialog box with message, title and multiple buttons.

messagebox example with message, title and button


Example 4: This message box has 4 arguments with message, title, button type and it displays icon

messagebox example with message, title, button and icon


Example 5: In the following example conditions given for two buttons. If user clicks OK then if condition executes and if user clicks cancel then else statement executes.

messagebox example with if else condition


Download Source Code:

free student projects


Video Tutorial: This video tutorial gives details explanation of messagebox.

About Anupa Manipal

A professional Software Developer in VB.NET - SQL Server and learner of PHP. Expertise in implementation of various projects including designing, development, coding and implementation of software applications.

Related Posts

Leave a Reply