Sunteți pe pagina 1din 5

1.

) Describe how the windows, components, and the features of the Visual Basic IDE are used
to develop, run, and debug an application

A form is a graphical object that contains a title bar, system menu, minimize, maximize and
close buttons.

The Toolbox contains controls used to add things to a form.

A Label Object displays text unchangeable by the user.

A Menu strip object displays a menu when the program runs, can be used to exit out and such.

Radio Buttons allows users to choose from a set of options and shows other text when pressed.

Buttons-Used to perform actions, can interact with labels and menu Describe how the windows,
Components, and the features of the Visual Basic IDE are used to develop, run, and debug an
application strips and such.

Properties window list properties of selected object, allows programmer to modify said object.

Applications consist of statements that are instructions for preforming tasks.

Comments are used to explain code for other programmers that want to help.

2.) Indicate what would be displayed if each of these expression were assigned to a label:
A. 10 + 3 - 6 = 7
B. 2 ^ 3 + 5 * 4 = 28
C. 4 + 3 * 2 = 10
D. 2 + 9 ^ () = 5
E. 15 * 2 + 4 =34
F. 15 * (2 + 4) = 90
G. 2 + 4 / 2 + 1 = 5
H. 5 - 3 ^ 2 + 1 = -3
I. 15 / 3 + 2 = 7
J. 6 + 3 - 2 = 6 + 3 - 2
K. 2 + 9 ^ = 6.5
L. 5 - 3 ^ (2 + 1) = -22

3.) Explain the term Event-driven

Event-Driven means that the program waits until an event occurs before executing the code

4.) List the controls presented in this chapter and explain how the user can interact with each
one

Buttons can be pushed and it does a specific task, such as display text.

Labels display text.


Group Boxes put different objects inside it such as radio buttons,

Radio Buttons can be clicked and it makes a choice based on the clicked one and runs the
chosen code.

Menu Strips Display menu with given sub menus which can do many things such as exit. That
the user can click on to run certain code.

5.) List at least one difference in the way a form looks between the Design window and at run
time.

In design mode the programmer can move stuff around and modify things as wanted while
running the program thing doesn't allow to modify anything

6.) List two way to terminate a running application.

Click the Stop Debugging Button on the toolbar, or press the X on the program.

7.) Explain the difference between the (Name) and Text properties of a control

The name refers to the object in the code when you want to mess around with it but the text is
just what it displays

8.) Why is it better to the statement Me.lblMessage.Text = Hello World than just
lblMessage.Text = Hello World

It is a code convention, making it easier to read, the Me is referring to an object assignment


command.

9.) Write the statements needed for the click event procedures of radSum and radDifference
based on the following application. Assume the first label is named lblMessage and the second
is named lblResult

Sum= lblMessage.Text = "The sum of x and y is " lblResult.Text = 5 + 3 Difference=


lblMessage.Text = "The difference of x and y is " lblResult.Text = 5 - 3

10.) Explain the errors in the following comments This is my first program 9/9/12 Display
Greeting Hi There!

It doesn't have a ' infront to make it a comment. There is a ' infront of Display Greeting turning it
into a comment.
True/False
11.)

a. A visual basic application consists of a single file.

False

b. A Windows application includes at least one form.

True

c. The text property of a form defines what is displayed in its title bar.

True

d. The properties of an object can only be set in the properties window.

False

e. Text displayed in a label can be changed by the user.

False

f. A menuitem object can have a click event procedure.

True

g. A menustrip component can have only one menuitem object.

False

h. Each line of a program code is called a object

False

i. Visual basic is an object-oriented programming language.

True
j. Program code is typed into design window.

False

k. Buttons in the toolbox are used to switch between the code and design window.

False

l. Click is an example of an event.

True

m. Private indicates that a procedure can be accessed outside of the form1 class.

False

n. Options displayed in an intelligence list vary depending on what is typed.

True

o. An assignment statement is used to change a value at run time.

True

p. More than one radio button in a set can be selected at a time

False

q. The only purpose of a GroupBox object is to display a title for a set of RadioButton
objects.

False

r. Comments affect the way an application runs.

False

s. Multiline comments are created by placing a question mark (?) at the beginning of each
Line

False

t. Code conventions are a set of guidelines for writing an application.

S-ar putea să vă placă și