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

Displaying the file without scrolling - document class, Displaying the file...

Displaying the file Without Scrolling: To display a file follow the steps as shown below: 1. Generate a SDI application. 2. Type the coding as shown in the Serialize els

Use serialize function in document class to implement file, USE OF SERIALIZ...

USE OF SERIALIZE FUNCTION IN DOCUMENT CLASS TO IMPLEMENT FILE void CStoreDoc::Serialize(CArchive& ar) { if (ar.IsStoring()) { // TODO: add storing code here }

Question, #question.algorithemtofindwhetheragivennumberisprime/not.

#question.algorithemtofindwhetheragivennumberisprime/not.

Mechanical project, sir , i need visual basic form design & coding for Reyn...

sir , i need visual basic form design & coding for Reynolds number & type of flow .

Adding records - data control, Adding Records: 1. As in the earlier ca...

Adding Records: 1. As in the earlier case Set the DatabaseName property as "C:\ex.mdb", now Set the Record Source for the data control as Customer and Set the Record Type to 0

Collection is adding last record, Please help me.. I am loading data from ...

Please help me.. I am loading data from a text file to a class (Item Inventory from Tony Gaddis - Visual Basic - Chapter 12 -programming challange# 7-9) and the last item loaded is

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

Calculating annual percent yield, I am having a hard time with calculating ...

I am having a hard time with calculating APY in my project. Every time I run the program my second APY is blank.

Help context property, Sets or returns context ID for topic in Help File. I...

Sets or returns context ID for topic in Help File. If Help file is indicated in the VBScript Err Object HelpFile Property, the HelpContext property is utilized to display automatic

Create an application, 1. Create a new solution file named Ch03HandsOnProje...

1. Create a new solution file named Ch03HandsOnProject1. 2. Rename the form and set the filename of the form to frmMain and frmMain.vb, respectively. 3. Set the appropriate p

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