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
DOCUMENT VIEW ARCHITECTURE The Document/View architecture is used to build an application based on the Microsoft Foundation Classes library. The Document/View architecture is s

Mostly time, you just desire to assign a single value to a variable you have declared. A variable having a single value is a scalar variable. At other times, this is convenient to

ILLUSTRATION OF CCOLORDIALOG The constructor of the CColorDialog takes the initial parameter as the default color and the next parameter specifies how much the dialog is displa


The Frame: As the name suggests, the frame is a combination of the building blocks, structure and the borders of an item. The frame gives the "physical" presence to a window.

I have an external application I open from visual studio (excel). I want to reposition where that opens (top, left).. How do I do that?

Creation of the Menu in VB 1. Initiate a new project by choosing a file and then new project. 2. Now select the Standard EXE as the Project type. 3. Build the Form1 activ

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

Create the flowcharts using MS Visio, MS Excel or MS Word to demonstrate the algorithm. Submit your flowchart under the assignment for CH7-4-26 Flowchart. Part Printouts H

VISUAL INTERFACE DESIGN Instead of the graphic nature of the program, only the visualness of the inter action is important. The program must not focus on the GUI. On the other