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

Assignment Help:

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


Related Discussions:- Message box - dialog box in visual basic

Introduction to visual basic, INTRODUCTION TO VB: The Windows programmi...

INTRODUCTION TO VB: The Windows programming is an event driven programming. The VB uses the Hungarian Notation for naming the variables. It deals with new data types like HWND,

Refresh method - data control, The Refresh Method: The refresh method ...

The Refresh Method: The refresh method transfer to the first record in the record set. To invoke the refresh method follow the syntax which is as shown below: Form1.Data1.R

Cdatabase class - database application, Cdatabase Class: The CDataBase...

Cdatabase Class: The CDataBase class helps to connect to the data source. The Open member function opens a connection to the data source. CRecordset class is used for performi

Kitchen mock, How to pull ordered menu from a cash till to database or disp...

How to pull ordered menu from a cash till to database or display on a computer screen

Creating an order entry and editing application , Assume you are creating a...

Assume you are creating an order entry and editing application for a book store. An order consists of a product, quantity, total price, payment type including Credit/Debit card acc

WebTime ASP.net , Let us modify the webTime ASP.NET project that we develop...

Let us modify the webTime ASP.NET project that we developed. We will add drop down lists for modifying the different style elements for the label element that displays the time. We

Architecture of win 32 program, ARCHITECTURE OF WIN 32 PROGRAM   ...

ARCHITECTURE OF WIN 32 PROGRAM   Figure: working of Win 3 program The hardware events in the figure are the mouse associated events like the mouse move, left

Login form, How to create a login form in vb 2010

How to create a login form in vb 2010

Source property, Returns or sets the name of the object or application whic...

Returns or sets the name of the object or application which generated the error originally. The Source property indicates a string expression which is usually the class name or pro

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd