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
Problem 1. Describe the importance and usage of .net framework in visual Studio 2. Write a program to sort and display an array of integers in ascending order using the conc

Software That Is Obscure: The Software hides the intensions, meaning and actions from the user. For illustration, if a user is asked whether a full installation, the custom in

- I have the chapter 5 project completed already. This is due tomorrow. Modify the Very Very .Boards project from Chapter 5 to separate the user interface from the business logic.

John''s gas supply is read from a 4-digit meter each month that shows the current total gas used in cubic meters. The amount of gas used that month is determined by subtracting t

DATA CONTROL The data control is used to connect to the database. Three properties are very necessary to connect to the database. The primary property is the database name. You

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

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

Write Visual Basic programs for the following: 1.     Write a program that uses a "For Loop" to generate a list of temperature conversions in one degree increments from a given

Depreciation to a Salvage Value of 0.   For tax purposes an item may be depreciated over a period of several years, n. With the straight-line method of depreciation, each year th

A vehicle dealership has a number of different items for sale: motorbikes, cars, vans and boats. Each class of items for sale has different characteristics that need to be recor