Transcript
Visual Basic 2012 How to Program
Dive Into® Visual Basic Express 2012 Express
2.1 Introduction
1. The purpose of the Visual Basic Express Edition IDE is to
a) create programs.
b) run programs.
c) debug programs.
d) All of the above.
Answer: d. All of the above.
2. Dragging and dropping predefined building blocks into place is part of visual programming in Visual Basic.
Answer: True.
2.2 Overview of the Visual Studio 2012 IDE
1. On the Start Page, the Get Started section contains:
a) sample projects
b) feedback links
c) recent projects
d) links to connect to the developer community
Answer: d. Links to connect to the developer community.
2. By default, the IDE assigns this name to a new Windows project:
a) NewProject1
b) WindowsApplication1
c) NewProject
d) MyProject
Answer: b. WindowsApplication1.
3. A is a window used to communicate with users.
a) project
b) control
c) dialog
d) None of the above.
Answer: c. Dialog.
4. The Microsoft Developers Network (MSDN) online library provides:
a) tutorials
b) articles
c) downloads
d) All of the above.
Answer: d. All of the above.
5. To make a new project you must go into the Get Started section.
Answer: False. There are multiple ways to make a new project.
6. For security reasons, you cannot browse the web from within the Visual Studio environment.
Answer: False. Visual Studio has an internal web browser.
7. Visual Studio provides an Online Community section that provides ways to contact other software developers via the Internet.
Answer: True.
8. A solution is a group of related files, such as Visual Basic code, images and documentation.
Answer: False. A project is a group of related files; a solution is a group of projects that represent a complete app or a set of related apps.
2.3 Menu Bar and Toolbar
1. Which menu contains commands for opening projects, closing projects, printing project data, etc.?
a) View menu
b) Edit menu
c) Tools menu
d) File menu
Answer: d. File menu.
2. The View menu:
a) Contains commands for displaying IDE windows and toolbars
b) Contains commands for arranging a form’s controls.
c) Contains commands for managing a project and its files.
d) Contains commands for compiling a program.
Answer: a. Contains commands for displaying IDE windows and toolbars.
3. Commands for managing the IDE and for developing, maintaining and executing programs are contained in the menus, which are located on the menu bar.
Answer: True.
4. You can also access all the commands in the menus from the toolbar.
Answer: False. You can access certain commonly used commands from the toolbar.
2.4 Navigating the Visual Studio IDE
1. To show the Solution Explorer if is not shown, select __________.
a) View > Solution Explorer
b) File > Solution Explorer
c) Edit > Solution Explorer
d) Tools > Solution Explorer
Answer: a. View > Solution Explorer.
2. The Properties window
a) allows you to modify control’s properties without writing any code.
b) displays a control’s information.
c) has the same set of options for every control.
d) a and b
e) a and c
Answer: d. Both (a) and (b).
3. By clicking on the pluses (+) and minuses (-) in the node tree you can add or remove items.
Answer: False. They expand and collapse the tree.
4. Autohide is what enables the tool box to shrink down to the edge of the screen.
Answer: True.
5. The Toolbox contains icons representing controls used to customize forms.
Answer: True.
2.5 Using Help
1. Visual Studio provides __________ pertaining to the “current content” (that is, the terms around the location of the mouse cursor).
a) content-sensitive help
b) context-sensitive help
c) location-sensitive help
d) mouse-sensitive help
Answer: b. Context-sensitive help.
2.6 Using Visual App Development to Create a Simple App that Displays Text and an Image
1. The PictureBox control is used to display:
a) text and images
b) only images
c) only text
d) colors
Answer: b. Only images.
2. Which of the following is not a supported image format:
a) GIF
b) TIF
c) PNG
d) JPEG
Answer: b. TIF.
3. The text in the Form’s title bar is determined by the Form’s Title property.
Answer: False. Text property.
4. Clicking BackColor in the Properties window allows the user to change the form’s background color.
Answer: True.
5. While in run mode, programmers have access to all the environment windows.
Answer: False. While in run mode, programmers have access to only a few of the environment windows.
6. Visual Basic files use a .net filename extension.
Answer: False. Visual Basic files use a .vb filename extension.