Deck 6: Multiform Projects
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Question
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/69
Play
Full screen (f)
Deck 6: Multiform Projects
1
The first form a project displays is called the default form.
False
2
Forms can be used in multiple projects.
True
3
Multiple forms are allowed in Visual Basic projects.
True
4
Add a new form to a project by selecting "Add Windows Form" from the "Project" menu.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
5
The programmer cannot make modifications to the code or the objects found in the About Box template.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
6
Most Windows programs contain an About box.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
7
Splash screens are widely used to give the user the indication that the program is loading and starting.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
8
When adding a form from another project,you should copy the form's files into the project folder and then select "Add Existing Item" from the "Project" menu.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
9
The logo or window that appears when a program is loading is called the About Box.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
10
About boxes are typically displayed by selecting "About" from the "Help" menu.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
11
The number of forms allowed in a Visual Basic project is virtually unlimited.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
12
Each form is a separate file in the project folder.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
13
Each form is a separate class in the project.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
14
When you select a form and choose "Exclude from project" from the "Project" menu,the form is removed from the project,but it is not deleted.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
15
With a project that uses multiple forms,it is possible to have objects with the same name,such as ExitButton,on different forms.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
16
When copying form files from another project,only copy the file with the .vb file extension and VB will automatically copy the form files with the Designer.vb extension and the .resx extension.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
17
Message boxes allow the programmer to be very creative when displaying summary information and company logos.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
18
The programmer can change the program's version by modifying the Assembly Information.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
19
If the programmer adds a Splash Screen template to a project,it will automatically be displayed for five seconds when the program begins loading.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
20
Forms can be deleted by choosing "Exclude from project" from the "Project" menu.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
21
If you declare a variable in a local procedure as Static,each call to the procedure preserves the previous value of the variable.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
22
When you use the Hide method on a particular form,the form will be removed from the screen and from memory.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
23
No other program code can execute until the modal form has been responded to and hidden or closed.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
24
The Show method displays a form as modeless.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
25
The user must respond to the form in some way when it is displayed as modeless.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
26
In order to make a variable available to other forms in a project,it must be declared as Static.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
27
A form's Close method removes the form from the screen and from memory.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
28
If forms are hidden,it is possible to have multiple forms in system memory and no forms appearing on the screen.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
29
If a variable is an accumulator and the value of the variable is only needed in one procedure,the variable should be declared as Static at the module-level.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
30
The form's Load event occurs each time the form is displayed.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
31
In a project with multiple forms,the _____________ form is the first form loaded into the computer's memory and displayed on the desktop.
A)default
B)startup
C)about
D)splash screen
A)default
B)startup
C)about
D)splash screen
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
32
If a variable is declared with a Dim statement in a sub procedure,all other forms in the project will have access to that variable.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
33
An About box should be closed,but a form that displays summary information may simply be hidden.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
34
Using a static local variable is better than using a module-level variable because it is always best to keep the scope of a variable as narrow as possible.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
35
The ShowDialog method displays a form as modal and is a good choice when you need the user to respond to the form before continuing.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
36
Module-level variables can be declared as Static.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
37
Write code in the form's Activated event if you want to set the focus in a specific object when a form appears.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
38
When a project begins,the first form to display is called the _______.
A)startup form
B)splash screen
C)about box
D)show dialog
A)startup form
B)splash screen
C)about box
D)show dialog
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
39
Which of the following statements about forms is NOT true?
A)You can have just one startup form in a project.
B)You can add an existing form from another project into your project.
C)With multiple forms,the startup form must be named MainForm.
D)The number of forms in a project is virtually unlimited.
A)You can have just one startup form in a project.
B)You can add an existing form from another project into your project.
C)With multiple forms,the startup form must be named MainForm.
D)The number of forms in a project is virtually unlimited.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
40
In order to make a splash screen appear when a project begins,you must designate the form that is the splash screen in the Project Designer.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
41
Use the _______ to display a form as modeless.
A)Show method
B)ShowDialog method
C)Modeless method
D)Mode method
A)Show method
B)ShowDialog method
C)Modeless method
D)Mode method
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
42
Which of the following statements is NOT true?
A)Module-level variables retain their values and are often used as counters and accumulators.
B)Counters and accumulators declared with the Static statement may only be used within the procedure in which they are declared.
C)Variables declared as Friend may be used in any procedure in any form in the project.
D)Variables declared as Private must be qualified (by adding the form name where they are declared)if they are used in any other form.
A)Module-level variables retain their values and are often used as counters and accumulators.
B)Counters and accumulators declared with the Static statement may only be used within the procedure in which they are declared.
C)Variables declared as Friend may be used in any procedure in any form in the project.
D)Variables declared as Private must be qualified (by adding the form name where they are declared)if they are used in any other form.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
43
The project's assembly information can be retrieved by using the _______ object.
A)My.Startup
B)My.SplashScreen
C)My.Application
D)My.About
A)My.Startup
B)My.SplashScreen
C)My.Application
D)My.About
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
44
The method used to display a modeless form is _______.
A)Load
B)Display
C)Hide
D)Show
A)Load
B)Display
C)Hide
D)Show
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
45
If you need to have a form disappear and you want it removed from memory,you should use the _______ method.
A)ShowDialog
B)Show
C)Hide
D)Close
A)ShowDialog
B)Show
C)Hide
D)Close
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
46
Which of the following is the correct statement to declare a variable that will keep track of the number of books sold at a school bookstore,and that will be available in order to display the total on a summary form?
A)Dim TotalBooksInteger As Integer
B)Static TotalBooksInteger As Integer
C)Private TotalBooksInteger As Integer
D)Friend TotalBooksInteger As Integer
A)Dim TotalBooksInteger As Integer
B)Static TotalBooksInteger As Integer
C)Private TotalBooksInteger As Integer
D)Friend TotalBooksInteger As Integer
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
47
The _______ is available in most Windows programs and usually displays information about the program version as well as the company name.
A)startup form
B)login form
C)about form
D)main form
A)startup form
B)login form
C)about form
D)main form
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
48
If you want to make sure that the focus is in the correct object when a form displays,you should write code in the form's _______ event.
A)Active
B)Load
C)Activated
D)Startup
A)Active
B)Load
C)Activated
D)Startup
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
49
When a form is displayed as __________________,the user is prevented from accessing any other form,even if another form is visible.
A)modular
B)modal
C)modeless
D)modeled
A)modular
B)modal
C)modeless
D)modeled
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
50
You can remove a form from a project by _______.
A)selecting the form's name in the Solution Explorer window and clicking the delete key
B)writing code in a button on the form that uses the form name and the Close method
C)right-clicking on the form's name in the Solution Explorer window and choosing Delete
D)Both answers A and C would remove a form from a project
A)selecting the form's name in the Solution Explorer window and clicking the delete key
B)writing code in a button on the form that uses the form name and the Close method
C)right-clicking on the form's name in the Solution Explorer window and choosing Delete
D)Both answers A and C would remove a form from a project
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
51
The _______ is found in the Project Designer and contains the information about the program title,program version,programmer,and company.
A)splash screen
B)about box
C)startup form
D)assembly information
A)splash screen
B)about box
C)startup form
D)assembly information
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
52
Which of the following is the correct order of events that occur when a form is displayed?
A)Load event and then the Activated event
B)SplashScreen event and then the Load event
C)Activated event and then the Load event
D)Load event,SetFocus event,and then the Activated event
A)Load event and then the Activated event
B)SplashScreen event and then the Load event
C)Activated event and then the Load event
D)Load event,SetFocus event,and then the Activated event
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
53
If you need the user to respond to a form before continuing,you should display the form as _______.
A)modular
B)modal
C)modeless
D)modeled
A)modular
B)modal
C)modeless
D)modeled
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
54
In order to add a template for a splash screen to a project,select _______ from the "Project" menu.
A)Add Windows Form
B)Add Existing Item
C)Add New Item
D)Both answers A and C are correct.
A)Add Windows Form
B)Add Existing Item
C)Add New Item
D)Both answers A and C are correct.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
55
If you have many forms in your project and you are sure you won't need a form again,it is best to use the _______ when making the form disappear.
A)Close method
B)Hide method
C)Unload method
D)Static statement
A)Close method
B)Hide method
C)Unload method
D)Static statement
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
56
To add a form from another project into your project,select _______ from the "Project" menu.
A)Add Windows Form
B)Add Existing Item
C)Add New Item
D)All of these could be used to add an existing form to your project.
A)Add Windows Form
B)Add Existing Item
C)Add New Item
D)All of these could be used to add an existing form to your project.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
57
Use the _______ if you want to require the user to respond to the form that is displayed before continuing.
A)Show method
B)ShowDialog method
C)Close method
D)Hide method
A)Show method
B)ShowDialog method
C)Close method
D)Hide method
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
58
If you need to have a form disappear but remain available in memory,you should use the _______ method.
A)ShowDialog
B)Show
C)Hide
D)Close
A)ShowDialog
B)Show
C)Hide
D)Close
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
59
Professional applications use a(n)_______ to tell the user that the program is loading and starting.
A)about box
B)splash screen
C)startup form
D)showdialog form
A)about box
B)splash screen
C)startup form
D)showdialog form
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
60
In order to add a new blank form to a project,select _______ from the "Project" menu.
A)Add Windows Form
B)Add Existing Item
C)Exclude from Project
D)All of these could be used to add a new blank form to a project.
A)Add Windows Form
B)Add Existing Item
C)Exclude from Project
D)All of these could be used to add a new blank form to a project.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
61
When you create and run an application,_______.
A)the executable file is placed in the project's bin\Debug folder
B)the splash screen is placed in the project's bin\Debug folder
C)the about box is placed in the project's bin\Debug folder
D)the hidden forms are placed in the project's bin\Debug folder
A)the executable file is placed in the project's bin\Debug folder
B)the splash screen is placed in the project's bin\Debug folder
C)the about box is placed in the project's bin\Debug folder
D)the hidden forms are placed in the project's bin\Debug folder
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
62
Variables that are declared locally and that will retain their values for multiple calls to the procedure should be declared as _______.
A)Static
B)Private
C)Dim
D)Friend
A)Static
B)Private
C)Dim
D)Friend
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
63
Give an example of when you might want to hide a form instead of closing it.Explain why hiding would be better than closing the form.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
64
Write the statement that will display a form named,SummaryForm,as modal.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
65
Write the statement to make the form named,MainForm,disappear and be removed from memory.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
66
Write the statement to declare a constant that can be used in multiple forms and that will hold the ABC company name.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
67
Variables declared as _______ are available only to the one form.
A)Public
B)Private
C)Friend
D)AccessLevel
A)Public
B)Private
C)Friend
D)AccessLevel
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
68
Use _______ to make a variable available to all classes in a project.
A)Dim
B)Friend
C)Static
D)Const
A)Dim
B)Friend
C)Static
D)Const
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck
69
Where may Static statements appear?
A)In a local procedure
B)In a block of code
C)In the Declarations section of a form
D)Answers A and B are both correct.
A)In a local procedure
B)In a block of code
C)In the Declarations section of a form
D)Answers A and B are both correct.
Unlock Deck
Unlock for access to all 69 flashcards in this deck.
Unlock Deck
k this deck