Deck 13: Graphics, Animation, Sound, and Drag-And-Drop

Full screen (f)
exit full mode
Question
In the VB graphics environment (GDI+),the programmer does not have to be concerned about the physical characteristics of the output device.
Use Space or
up arrow
down arrow
to flip the card.
Question
An easy way to show some animation on a form is by replacing one picture with another.
Question
To remove a picture from the user's view,the Visible property of the PictureBox is set to False.
Question
A pixel is a dot that makes up a picture.
Question
The term pixel is an abbreviation of "picture element."
Question
Use the Pen object to draw lines on a form.
Question
The Graphics methods that are used to draw a circle on a form or control can be used with either a Windows Form or a Web Form.
Question
If you don't set the width of a Pen,it defaults to one pixel.
Question
The Top and Left properties of an object determine the position of the upper-left corner of the object on the form.
Question
Point,Size,and Rectangle structures can be used to specify starting positions in the graphics methods.
Question
The form's Paint event executes when the window is displayed,resized,moved,maximized,restored,or uncovered.
Question
A GroupBox has its own 0,0 coordinate system.
Question
Pictures can be loaded,moved,and resized only at design time.
Question
By controlling the location and visibility of controls,animation effects can be created by using similar pictures.
Question
In the coordinate system,the X is the horizontal position and the Y is the vertical position.
Question
Animation can be achieved by displaying an animated .gif file on a Windows Form,but not a Web Form.
Question
Pictures can be loaded,moved,and resized at run time.
Question
A Pen object is used to fill in a pie chart.
Question
The term,graphics,refers to any text,drawing,image,or icon you display on the screen.
Question
Using a control's SetBounds method produces a smoother-appearing animation than the animation that is produced by changing the Left and Top properties of a control.
Question
The Scroll event of a scroll bar occurs anytime the scroll box is moved.
Question
The source object is the item you wish to drag.
Question
The DragEnter event fires when the user drags a source object over the target.
Question
The Timer component causes events to occur without user action.
Question
The Windows Media Player control can play audio and video files in many formats,including .avi,.wmv,and .wav.
Question
The Value property indicates the current position of the scroll box and its corresponding value within the scroll bar.
Question
The term,graphics,refers to which of the following?

A)text
B)drawings
C)image
D)all of these
Question
The scroll bar's SmallChange property is changed when the user clicks on the scroll arrow in a scroll bar.
Question
The coordinate system uses _______.

A)X as the horizontal position and Y as the vertical position
B)X as the vertical position and Y as the horizontal position
C)the lower right-hand corner of a form
D)the Left property and the Width property
Question
The target object uses a control's DoDragDrop method.
Question
The form you are designing requires a blue line graphic that is 10 pixels wide.What is the declaration statement for the Pen object?

A)Dim BluePen as New Pen (Color,10)
B)Dim BluePen(10)as New Pen (ColorBlue)
C)Dim Pen(Blue)as New Pen(10)
D)Dim BluePen as New Pen(Color.Blue,10)
Question
A graphic is being placed on a button control on the form.Which object's starting point is used for the graphic?

A)The form
B)The button
C)A GroupBox
D)A PictureBox
Question
When designing a form having graphics,the programmer creates a Graphics object to _______.

A)draw with
B)determine the characteristics of output devices
C)use as a drawing surface
D)none of these
Question
You will code a Click event when you write code for a scroll bar.
Question
Pen objects are used for _______.

A)lines
B)filled shapes
C)outline of shapes
D)both A and C
Question
You must set the AllowDrop property to True in order to set a control to be a target.
Question
If the user drags the scroll box in a scroll bar control,the scroll bar's Scroll event occurs.
Question
To make sure that the graphics on the form get redrawn every time the form is rendered,place the code in the form's _______ procedure.

A)Load
B)Activate
C)Redraw
D)Paint
Question
The Interval property of the Timer is calculated in milliseconds.
Question
The ScrollBar_Click event occurs when the user clicks the up arrow of a vertical scroll bar.
Question
Use _______ in order to add sound to your project.

A)the SoundPlayer component
B)the Sound control
C)My.Computer.Audio.Play
D)Both answers A and C are correct.
Question
Which property of the SoundPlayer component determines the location of the wave file?

A)Wave
B)Sound
C)Location
D)SoundLocation
Question
The _______ has two components,the width and height.

A)Point structure
B)Size structure
C)Rectangle structure
D)Graphics method
Question
Each of the drawing methods allows you to specify the _______.

A)starting point for the upper-left corner of the drawing object
B)size of the drawing object
C)both A and B
D)neither A nor B
Question
Which event occurs as the user drags the scroll box along the scroll bar?

A)Click
B)Drag
C)Move
D)Scroll
Question
Which scroll bar property contains the number that indicates the current location of the scroll box in the scroll bar?

A)Min
B)Width
C)Index
D)Value
Question
The SmallChange property of a scroll bar _______.

A)determines the distance to move when the user clicks on the scroll arrow
B)decreases when the user presses on the down arrow of a vertical scroll bar
C)is the minimum value of the scroll bar
D)increases when the user presses on the down arrow of a vertical scroll bar
Question
The _______ event fires when the user releases the mouse button over the target.

A)DragDrop
B)DragEnter
C)MouseEnter
D)DoDragDrop
Question
The LargeChange property of scroll bars controls the _______.

A)distance to move when the user clicks on the gray area of the scroll bar
B)distance to move when the user clicks on the scroll arrow
C)maximum value of the scroll bar
D)minimum value of the scroll bar
Question
The _______ event fires when the user drags a source object over the target.

A)DragDrop
B)DragEnter
C)MouseEnter
D)DoDragDrop
Question
Which of the following is NOT an effect of the DoDragDrop method?

A)Copy
B)Move
C)None
D)All of these are effects of the DoDragDrop method.
Question
When the user clicks the up arrow of a vertical scroll bar,the Value property decreases by the amount of the _______ property.

A)Minimum
B)Maximum
C)SmallChange
D)LargeChange
Question
Which of the following will allow you to move controls across the screen?

A)A PictureBox control's Move method and a Timer control's Tick event
B)A PictureBox control's Visible property and a Timer control's Move event
C)A PictureBox control's SetBounds method and a Timer control's Tick event
D)A PictureBox control's Move event and a Timer component's Click event
Question
The _______ class contains various methods for returning random numbers of different data types.

A)Generate
B)Random
C)Rnd
D)Randomize
Question
To have a PictureBox control move every 3 seconds,the Timer's Interval property is set to _______.

A)3
B)30
C)300
D)3000
Question
The Timer component _______.

A)has a Tick event that occurs at specified intervals
B)can be used to animate objects without user intervention
C)can be disabled by setting the Enabled property to False
D)All of the answers are correct.
Question
The _______ holds the X and Y coordinates as a single unit.

A)Point structure
B)Size structure
C)Rectangle structure
D)Graphics method
Question
To produce smooth movement of a control on a form,use the control's _______ method.

A)MoveBounds
B)LeftBounds
C)SetBounds
D)TopBounds
Question
To make sure the Scroll Bar events occur anytime there is a change in the Value property of the control,which two events need to contain code?

A)Click event and Scroll event
B)Value event and Click event
C)ValueChanged event and Scroll event
D)ValueChanged event and Click event
Question
The _______ property of a scroll bar determines the distance to move when the user clicks the gray area of the scroll bar or presses the Page-Up or Page-Down keys.

A)Minimum
B)Maximum
C)SmallChange
D)LargeChange
Question
Write the code to draw a rectangle on a form.
Question
Explain the use of the X and Y coordinates in the drawing methods.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/62
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 13: Graphics, Animation, Sound, and Drag-And-Drop
1
In the VB graphics environment (GDI+),the programmer does not have to be concerned about the physical characteristics of the output device.
True
2
An easy way to show some animation on a form is by replacing one picture with another.
True
3
To remove a picture from the user's view,the Visible property of the PictureBox is set to False.
True
4
A pixel is a dot that makes up a picture.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
5
The term pixel is an abbreviation of "picture element."
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
6
Use the Pen object to draw lines on a form.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
7
The Graphics methods that are used to draw a circle on a form or control can be used with either a Windows Form or a Web Form.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
8
If you don't set the width of a Pen,it defaults to one pixel.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
9
The Top and Left properties of an object determine the position of the upper-left corner of the object on the form.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
10
Point,Size,and Rectangle structures can be used to specify starting positions in the graphics methods.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
11
The form's Paint event executes when the window is displayed,resized,moved,maximized,restored,or uncovered.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
12
A GroupBox has its own 0,0 coordinate system.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
13
Pictures can be loaded,moved,and resized only at design time.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
14
By controlling the location and visibility of controls,animation effects can be created by using similar pictures.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
15
In the coordinate system,the X is the horizontal position and the Y is the vertical position.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
16
Animation can be achieved by displaying an animated .gif file on a Windows Form,but not a Web Form.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
17
Pictures can be loaded,moved,and resized at run time.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
18
A Pen object is used to fill in a pie chart.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
19
The term,graphics,refers to any text,drawing,image,or icon you display on the screen.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
20
Using a control's SetBounds method produces a smoother-appearing animation than the animation that is produced by changing the Left and Top properties of a control.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
21
The Scroll event of a scroll bar occurs anytime the scroll box is moved.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
22
The source object is the item you wish to drag.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
23
The DragEnter event fires when the user drags a source object over the target.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
24
The Timer component causes events to occur without user action.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
25
The Windows Media Player control can play audio and video files in many formats,including .avi,.wmv,and .wav.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
26
The Value property indicates the current position of the scroll box and its corresponding value within the scroll bar.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
27
The term,graphics,refers to which of the following?

A)text
B)drawings
C)image
D)all of these
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
28
The scroll bar's SmallChange property is changed when the user clicks on the scroll arrow in a scroll bar.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
29
The coordinate system uses _______.

A)X as the horizontal position and Y as the vertical position
B)X as the vertical position and Y as the horizontal position
C)the lower right-hand corner of a form
D)the Left property and the Width property
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
30
The target object uses a control's DoDragDrop method.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
31
The form you are designing requires a blue line graphic that is 10 pixels wide.What is the declaration statement for the Pen object?

A)Dim BluePen as New Pen (Color,10)
B)Dim BluePen(10)as New Pen (ColorBlue)
C)Dim Pen(Blue)as New Pen(10)
D)Dim BluePen as New Pen(Color.Blue,10)
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
32
A graphic is being placed on a button control on the form.Which object's starting point is used for the graphic?

A)The form
B)The button
C)A GroupBox
D)A PictureBox
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
33
When designing a form having graphics,the programmer creates a Graphics object to _______.

A)draw with
B)determine the characteristics of output devices
C)use as a drawing surface
D)none of these
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
34
You will code a Click event when you write code for a scroll bar.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
35
Pen objects are used for _______.

A)lines
B)filled shapes
C)outline of shapes
D)both A and C
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
36
You must set the AllowDrop property to True in order to set a control to be a target.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
37
If the user drags the scroll box in a scroll bar control,the scroll bar's Scroll event occurs.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
38
To make sure that the graphics on the form get redrawn every time the form is rendered,place the code in the form's _______ procedure.

A)Load
B)Activate
C)Redraw
D)Paint
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
39
The Interval property of the Timer is calculated in milliseconds.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
40
The ScrollBar_Click event occurs when the user clicks the up arrow of a vertical scroll bar.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
41
Use _______ in order to add sound to your project.

A)the SoundPlayer component
B)the Sound control
C)My.Computer.Audio.Play
D)Both answers A and C are correct.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
42
Which property of the SoundPlayer component determines the location of the wave file?

A)Wave
B)Sound
C)Location
D)SoundLocation
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
43
The _______ has two components,the width and height.

A)Point structure
B)Size structure
C)Rectangle structure
D)Graphics method
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
44
Each of the drawing methods allows you to specify the _______.

A)starting point for the upper-left corner of the drawing object
B)size of the drawing object
C)both A and B
D)neither A nor B
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
45
Which event occurs as the user drags the scroll box along the scroll bar?

A)Click
B)Drag
C)Move
D)Scroll
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
46
Which scroll bar property contains the number that indicates the current location of the scroll box in the scroll bar?

A)Min
B)Width
C)Index
D)Value
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
47
The SmallChange property of a scroll bar _______.

A)determines the distance to move when the user clicks on the scroll arrow
B)decreases when the user presses on the down arrow of a vertical scroll bar
C)is the minimum value of the scroll bar
D)increases when the user presses on the down arrow of a vertical scroll bar
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
48
The _______ event fires when the user releases the mouse button over the target.

A)DragDrop
B)DragEnter
C)MouseEnter
D)DoDragDrop
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
49
The LargeChange property of scroll bars controls the _______.

A)distance to move when the user clicks on the gray area of the scroll bar
B)distance to move when the user clicks on the scroll arrow
C)maximum value of the scroll bar
D)minimum value of the scroll bar
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
50
The _______ event fires when the user drags a source object over the target.

A)DragDrop
B)DragEnter
C)MouseEnter
D)DoDragDrop
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
51
Which of the following is NOT an effect of the DoDragDrop method?

A)Copy
B)Move
C)None
D)All of these are effects of the DoDragDrop method.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
52
When the user clicks the up arrow of a vertical scroll bar,the Value property decreases by the amount of the _______ property.

A)Minimum
B)Maximum
C)SmallChange
D)LargeChange
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
53
Which of the following will allow you to move controls across the screen?

A)A PictureBox control's Move method and a Timer control's Tick event
B)A PictureBox control's Visible property and a Timer control's Move event
C)A PictureBox control's SetBounds method and a Timer control's Tick event
D)A PictureBox control's Move event and a Timer component's Click event
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
54
The _______ class contains various methods for returning random numbers of different data types.

A)Generate
B)Random
C)Rnd
D)Randomize
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
55
To have a PictureBox control move every 3 seconds,the Timer's Interval property is set to _______.

A)3
B)30
C)300
D)3000
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
56
The Timer component _______.

A)has a Tick event that occurs at specified intervals
B)can be used to animate objects without user intervention
C)can be disabled by setting the Enabled property to False
D)All of the answers are correct.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
57
The _______ holds the X and Y coordinates as a single unit.

A)Point structure
B)Size structure
C)Rectangle structure
D)Graphics method
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
58
To produce smooth movement of a control on a form,use the control's _______ method.

A)MoveBounds
B)LeftBounds
C)SetBounds
D)TopBounds
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
59
To make sure the Scroll Bar events occur anytime there is a change in the Value property of the control,which two events need to contain code?

A)Click event and Scroll event
B)Value event and Click event
C)ValueChanged event and Scroll event
D)ValueChanged event and Click event
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
60
The _______ property of a scroll bar determines the distance to move when the user clicks the gray area of the scroll bar or presses the Page-Up or Page-Down keys.

A)Minimum
B)Maximum
C)SmallChange
D)LargeChange
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
61
Write the code to draw a rectangle on a form.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
62
Explain the use of the X and Y coordinates in the drawing methods.
Unlock Deck
Unlock for access to all 62 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 62 flashcards in this deck.