DON'T
GET
DISCOURAGED!!!
YOU
ARE
MAKING
FAST
PROGRESS
TOWARDS
A
HIGH
PAYING
CAREER
AS
A
VB
PROGRAMMER!!!
OBJECTIVES
This lesson will examine how to incorporate dialog boxes into your
programs. Dialog boxes are used to display information to the user
and to get information from the user. In VB there are three types
of dialog boxes: Predefined, Custom and Common.
DIALOG BOXES
1. What is the difference between the MsgBox statement and the
MsgBox() function?
2. What does the following statement do?
MsgBox "File is missing!", MB_OK, "ERROR"
3. What does the following code do?
If MsgBox ("Exit the program?", MB_YESNO, "DEMO")= ID_YES
> Then
End
Endif
4. What does the following code do?
UserName = InputBox ("Enter your name:", "Demo")
If UserName<>" " Then
MsgBox "Hello "+Username
Endif
5. Assume that you designed a custom dialog box called frmMyDialog.
What does the following sentence do?
frmMyDialog.Show 1
6. Assume that you designed a custom dialog box called frmMyDialog.
What does the following statement do?
frmMyDialog.Hide
7. Assume that you have a common dialog custom control called CMDialog1.
What does the following statement do?
CMDialog1.Action = 2
TEST YOUR PROGRESS
BACK TO HOMEPAGE