Message box - dialog box in visual basic, Visual Basic Programming

Message Box:

The Message Box can be specified a title as shown in figure to specify the title for the message box follow by the command given below:

 Private Sub Command1_Click()

Dim i As Integer

i = 80

MsgBox "i is " & i, vbOKCancel, "demo"

End Sub

1118_message box.png

Figure: Message box

Whenever the command button is clicked a message box is exhibited with the contents as " i is 80" and OK and Cancel buttons are exhibited. The message box is exhibited with a title as demo that is the third parameter of the MsgBox command.

Whenever the mouse is clicked on the form, and the event Form_MouseDown gets executed. The event handler is specified below. The contents of the MsgBox would be the demo of msgbox and Yes, No buttons would be exhibited on the MsgBox as shown in figure. The third parameter, namely the sample would be the title of the MsgBox.

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y

As Single)

MsgBox "demo of msgbox", vbYesNo, "sample"

End Sub


305_message box1.png

Figure: Message box

Posted Date: 10/9/2012 9:17:45 AM | Location : United States

Related Discussions:- Message box - dialog box in visual basic, Assignment Help, Ask Question on Message box - dialog box in visual basic, Get Answer, Expert's Help, Message box - dialog box in visual basic Discussions

Write discussion on Message box - dialog box in visual basic
Your posts are moderated
Related Questions
I have a problem with Visual Basic: exchangeable 2 images of place I have 2 picturebox''s placed a button when I click on the button, the 2 pictures of this place change with e

Benefits of Using DLLs: The dynamic linking has the following advantages which are as shown below: It saves memory and decreases the swapping. Many processes can use a s

1.   Make project in Visual Studio 2008. 2.   Controller Class is used for functioning. 3.   Login Form where three people can login like manager, staff and receptionist we c

Task 1 - Design the DATEX operator's user interfaces for: 1. Preparing messages. 2. Sending messages. 3. Viewing received messages. 4. Optionally view the details of the codin

You are asked to create the LOTO game customized according to the following constraints: 1. Create a grid containing 20 numbers (20 buttons: button1, button2, …button20) 2. When t

Software That Is Rude: The software warns the user for making the mistakes. The Message boxes pop up representing the mistake and the user will have to click the OK or CANCEL

Visual Basic 1. What is the method of creating a new project in VB.SSS 2. Illustrate Code Editor Window and Solution Explorer. 3. Write a VB program to sort and display a

Dialog Based Application: (A) Dialog Based Application to demonstrate Animate Control: 1. Build a dialog based application. 2. Design the dialog as shown. 3. Place

ODBC   The ODBC gives an API which distinguishes the data base vendors implementation via the ODBC drivers specific to a DBMS. The program will use the API to call the ODBC dr

two sides are given of a sheet e.g 23*36 i want half or 1/2 of this sheet next i want 1/4(one fourth) of this sheet if sheet size is 23*36 next i want 1/8 similary as above