Chapter 9 View contents of this chapter

Introduction

In this chapter, you will learn how to get user's input and send information to the screen as output. This chapter discusses some important internal functions provided by Visual Basic to perform I/O. An internal function takes values you send to it and sends back a single value to your program. You typically pass one or more values to a function; rarely will a function require nothing to be passed. The values that are passed to functions are called arguments.

The MsgBox() Function

This function produces a pop-up message box. It displays an icon and a message along with at least one command button. The command button gives the user a chance to read the message and click the button when done. Succinctly, the MsgBox() function displays a message in a dialog box, waits for the user to click a button, and returns an Integer indicating which button the user clicked.

Play Sound A message box is a small dialog box used for output during a program's execution.

The arguments that are supplied to the MsgBox() function determine which icon to display, the message, and the number of command buttons.

Play Sound The programmer controls how the message box appears to the user.

When the MsgBox() completes, its return value specifies which command was clicked by the user.



© Universal Teacher Publications        INDEX Previous Screen Next Screen