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
How to Include List Box control in your project A list box is used for representing the users with a data. You can prefer the data from the list box for data entry. No editing

In your code A, Function has to always be used on the right side of a variable assignment or in an expression. For illustration: Temp = Celsius(fDegrees) or Msg Box "The C

For ..... Next Repetition Statement: To demonstrate the working of for .. next control statement, put a command button and a label control on the form. The Handle clicks the e

DATA TYPES   The different primitive data types are Boolean, Char, Byte, Date, Decimal, Uinteger, Double, Integer, Long, Sbyte, Short, Single, String, Ulong & Ushort. To decla

IMAGELIST The CImageList object is a collection of the same sized images, all of which can be referred to by its index. The ImageList are used to proficiently manage the large


The Document: The document contains the user's data. For illustration, after working on a text processor, the user may wish for to save the file. Such an action builds a docum

You can employ For...Next statements to run a block of statements a specific number of times. For loops, employ a counter variable whose value is increased or decreased with each r

i have connected my visual basic 2010 express in ports and use it to send sms but it failed... now my teacher said that i have to use my LAN not port to send it instead..... please

Question 1 Write about the Visual Basic Application Development Life cycle with a sample Forms development for performing integer arithmetic operations Question 2 Discuss the