Deck 14: GUI With Windows Forms: Part 1

Full screen (f)
exit full mode
Question
Event handlers are methods that process events and perform tasks based on those events.
Use Space or
up arrow
down arrow
to flip the card.
Question
Events can be:

A) generated within the code of the program
B) started with a click on a button, or other control
C) generated by keyboard input
D) All of the above
Question
How are event handlers generated

A) by double-clicking on components
B) explicitly writing the code for the event
C) using the Properties window
D) All of the above
Question
Events occur,for example,when the user clicks the mouse or types on the keyboard and interacts with controls.
Question
ListBoxes and ComboBoxes are the same other than the fact that ComboB
oxes have a drop-down list.
Question
An example of a component would be:

A) a button
B) a timer
C) a form
D) All of the above
Question
By looking up ControlName class and clicking the events section,you can find out all the events and the parameters a control has.
Question
An example of software with a GUI is:

A) Windows
B) Internet Explorer
C) Visual Studio
D) All of the above
Question
Multicast event delegates must reference methods:

A) with the same name, but a different signature
B) that should all be raised by the same event
C) defined earlier in the program
D) with different names and different signatures
Question
All of the controls and components can be found in the tool box.
Question
Event delegates act as a go-between for objects raising events and the methods that are handling them.
Question
A Panel is used to:

A) group or store components
B) display text
C) create a border around components
D) add style to a form
Question
Delegates act as:

A) ways of sorting events
B) a go-between for objects raising events and the methods that handle the events
C) masks for methods that handle events
D) a way to call many methods at once
Question
In order to add or remove an event from a delegate,you would use:

A) the Add and Remove methods
B) the Add and Subtract methods
C) the += and the -= operators
D) events can only be added with the += and not removed from a delegate
Question
In order to create an event you must click on the event icon in the properties window.
Question
A ComboBox can display info and also have the user input info.
Question
Many of the components used for Windows apps are defined in namespace:

A) System
B) System.Windows.Forms
C) System.Windows.UI
D) System.Web.UI
Question
A Label allows input to be typed into it.
Question
Event delegates can contain any method.
Question
A GUI allows the user to interact with the program visually.
Question
You can use the Tab property to determine the order in which tab
bing will occur.
Question
In order to insert a control into a Panel or GroupBox in Design mode one must:
a) manually create the control inside the Panel or GroupBox
b) create a control and then drag it into the Panel or GroupBox
c) create a control and then set it as inside the Panel or GroupBox
d) group several controls and set their MainControl property to the Panel or GroupBox
Question
RadioButtons can be used interchangeably with CheckBoxes.
Question
All buttons,including checkboxes and radiobuttons,are derived from class Button.
Question
What does the method InitializeComponent contain
a) code provided by the user which sets the properties of controls that were added
b) code provided by Visual Studio which sets the properties of controls that were added
c) a and b
d) None of the above
Question
Visual Studio provides snap lines to help align controls.
Question
The major difference between a CheckBox and a RadioButton is that:

A) RadioButtons are generally grouped to allow choices
B) CheckBoxes usually represent options that allow more than one to be used
C) Only one RadioButton per group can be selected at once
D) b and c
Question
Textboxes can enable the Password property,meaning that the user needs a password to use them.
Question
The Enabled property does not allow the control to perform actions when it's set to false.
Question
An active control is one that:

A) can move about the screen.
B) is most commonly clicked by the user
C) has the focus
D) one that changes, whether it is color or another property, on an event.
Question
A difference between textboxes and labels is:

A) textboxes have a drop-down feature
B) labels cannot be changed during runtime
C) textboxes allow the user to enter information into them
D) nothing
Question
Property Anchor allows the programmer to prevent form alterations by the user.
Question
Using the CheckState property you can determine whether the CheckBox is checked.
Question
The Margin property specifies the distance between the docked control and the Form edges.
Question
The AutoScroll property will cause a Panel to scroll to the bottom if the controls displayed are too large.
Question
GroupBoxes can display captions and do not include scrollbars,whereas Panels can include scrollbars and do no include a caption.
Question
GroupBoxes and Panels are used to:

A) bundle a bunch of controls into one package
B) allow more than one RadioButton to be true at the same time if the radio buttons are on different GroupBoxes or Panels
C) organize the form in a more orderly fashion
D) All of the above
Question
Panels have the ability to have scrollbars should their contents get too big.
Question
Docking and anchoring are easy ways to:

A) allow a form to change size without altering the form too much.
B) prevent users from changing the layout of the window.
C) prevent a user from resizing the form.
D) All of the above
Question
GroupBoxes have a text display and can have scrollbars inserted into them.
Question
When adding a ToolTip component from the Toolbox,it appears on the arbitrary location on the Form.
Question
The Directory class can be used to find specific images on the computer.
Question
The GetCurrentDirectory is used to return the location of the current working directory (the location from which the program is running).
Question
Only one RadioButton can be checked per form on the screen.
Question
Mouse interaction with the GUI is limited to click,press,and move.
Question
What does the InitialDelay property of the ToolTip determine

A)The amount of time that the tool tip appears while the mouse is over a control.
B)The amount of time that a mouse must hover over a control before a tool tip appears.
C) The amount of time between which two different tool tips appear.
Question
When a ToolTip is being displayed,its appearance remains the same.
Question
When obtaining the coordinates of the mouse,they are

A) always taken from the main form of the program
B) relative to the control that caused the event
C) taken from the center of the form
D) start from wherever the mouse is at that second
Question
MouseUp and MouseDown events are used when the mouse moves up or down.
Question
The Directory class is found within the System namespace.
Question
What control should you use to restrict a user's choice to a specific range of numeric values,

A)NumericUpDown
B)TextBox
C)NumberBox
D)None of the above
Question
When using mouse coordinates,(0,0)is located in the:

A) bottom left
B) bottom right
C) top left
D) top right
Question
What is a tool tip useful for

A)tip of the mouse is blinks while hovering over an item in a GUI
B)the tip of the mouse is highlighted while hovering over an item in a GUI
C)displays helpful text under the mouse while hovering over an item in a GUI
D)All of the above
Question
In order to find out which key the user is pressing you should use the:

A) KeyChar property to return the pressed key
B) Key property to return the pressed key
C) KeyPress property to return the pressed key
D) GetKey property to return the pressed key
Question
The StretchImage property is used to:

A) change the size of the image to fit the PictureBox
B) change the size of the PictureBox to fit the image
C) find a medium between the PictureBox and the image
D) make the picture as large as possible while still maintaining quality
Question
The AutoSize property is used to:

A) change the size of the image to fit the PictureBox
B) change the size of the PictureBox to fit the image
C) find a medium between the PictureBox and the actual picture
D) make the picture as large as possible while still maintaining quality
Question
What does the ReadOnly property indicate

A)the number of the control cannot change
B)the user cannot click the buttons to select a number into the control
C)the user cannot type data into the control
D) all of the above
Question
PictureBoxes can be used with ·gif,·jpg,bitmaps,icons and metafiles.
Question
CheckBoxes and RadioButtons have a CheckedChanged event that's raised whenever the state of that control is altered.
Question
The Clicks property of class MouseEventArgs is used to determine the number of times a Button was clicked.
Question
In order to use modifier keys you should:

A) use the ModifierKey event.
B) use the KeyData property.
C) use the ModifierKeyHandler.
D) modifier keys have to be dealt with manually.
Question
Pressing Enter to make a Button become depressed is not a key event;it's set in the control's properties.
Question
KeyPress events cannot deal with modifier keys.
Question
Key events are more important to the program than other events.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/64
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 14: GUI With Windows Forms: Part 1
1
Event handlers are methods that process events and perform tasks based on those events.
True
2
Events can be:

A) generated within the code of the program
B) started with a click on a button, or other control
C) generated by keyboard input
D) All of the above
D
3
How are event handlers generated

A) by double-clicking on components
B) explicitly writing the code for the event
C) using the Properties window
D) All of the above
D
4
Events occur,for example,when the user clicks the mouse or types on the keyboard and interacts with controls.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
5
ListBoxes and ComboBoxes are the same other than the fact that ComboB
oxes have a drop-down list.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
6
An example of a component would be:

A) a button
B) a timer
C) a form
D) All of the above
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
7
By looking up ControlName class and clicking the events section,you can find out all the events and the parameters a control has.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
8
An example of software with a GUI is:

A) Windows
B) Internet Explorer
C) Visual Studio
D) All of the above
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
9
Multicast event delegates must reference methods:

A) with the same name, but a different signature
B) that should all be raised by the same event
C) defined earlier in the program
D) with different names and different signatures
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
10
All of the controls and components can be found in the tool box.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
11
Event delegates act as a go-between for objects raising events and the methods that are handling them.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
12
A Panel is used to:

A) group or store components
B) display text
C) create a border around components
D) add style to a form
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
13
Delegates act as:

A) ways of sorting events
B) a go-between for objects raising events and the methods that handle the events
C) masks for methods that handle events
D) a way to call many methods at once
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
14
In order to add or remove an event from a delegate,you would use:

A) the Add and Remove methods
B) the Add and Subtract methods
C) the += and the -= operators
D) events can only be added with the += and not removed from a delegate
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
15
In order to create an event you must click on the event icon in the properties window.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
16
A ComboBox can display info and also have the user input info.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
17
Many of the components used for Windows apps are defined in namespace:

A) System
B) System.Windows.Forms
C) System.Windows.UI
D) System.Web.UI
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
18
A Label allows input to be typed into it.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
19
Event delegates can contain any method.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
20
A GUI allows the user to interact with the program visually.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
21
You can use the Tab property to determine the order in which tab
bing will occur.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
22
In order to insert a control into a Panel or GroupBox in Design mode one must:
a) manually create the control inside the Panel or GroupBox
b) create a control and then drag it into the Panel or GroupBox
c) create a control and then set it as inside the Panel or GroupBox
d) group several controls and set their MainControl property to the Panel or GroupBox
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
23
RadioButtons can be used interchangeably with CheckBoxes.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
24
All buttons,including checkboxes and radiobuttons,are derived from class Button.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
25
What does the method InitializeComponent contain
a) code provided by the user which sets the properties of controls that were added
b) code provided by Visual Studio which sets the properties of controls that were added
c) a and b
d) None of the above
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
26
Visual Studio provides snap lines to help align controls.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
27
The major difference between a CheckBox and a RadioButton is that:

A) RadioButtons are generally grouped to allow choices
B) CheckBoxes usually represent options that allow more than one to be used
C) Only one RadioButton per group can be selected at once
D) b and c
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
28
Textboxes can enable the Password property,meaning that the user needs a password to use them.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
29
The Enabled property does not allow the control to perform actions when it's set to false.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
30
An active control is one that:

A) can move about the screen.
B) is most commonly clicked by the user
C) has the focus
D) one that changes, whether it is color or another property, on an event.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
31
A difference between textboxes and labels is:

A) textboxes have a drop-down feature
B) labels cannot be changed during runtime
C) textboxes allow the user to enter information into them
D) nothing
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
32
Property Anchor allows the programmer to prevent form alterations by the user.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
33
Using the CheckState property you can determine whether the CheckBox is checked.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
34
The Margin property specifies the distance between the docked control and the Form edges.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
35
The AutoScroll property will cause a Panel to scroll to the bottom if the controls displayed are too large.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
36
GroupBoxes can display captions and do not include scrollbars,whereas Panels can include scrollbars and do no include a caption.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
37
GroupBoxes and Panels are used to:

A) bundle a bunch of controls into one package
B) allow more than one RadioButton to be true at the same time if the radio buttons are on different GroupBoxes or Panels
C) organize the form in a more orderly fashion
D) All of the above
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
38
Panels have the ability to have scrollbars should their contents get too big.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
39
Docking and anchoring are easy ways to:

A) allow a form to change size without altering the form too much.
B) prevent users from changing the layout of the window.
C) prevent a user from resizing the form.
D) All of the above
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
40
GroupBoxes have a text display and can have scrollbars inserted into them.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
41
When adding a ToolTip component from the Toolbox,it appears on the arbitrary location on the Form.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
42
The Directory class can be used to find specific images on the computer.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
43
The GetCurrentDirectory is used to return the location of the current working directory (the location from which the program is running).
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
44
Only one RadioButton can be checked per form on the screen.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
45
Mouse interaction with the GUI is limited to click,press,and move.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
46
What does the InitialDelay property of the ToolTip determine

A)The amount of time that the tool tip appears while the mouse is over a control.
B)The amount of time that a mouse must hover over a control before a tool tip appears.
C) The amount of time between which two different tool tips appear.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
47
When a ToolTip is being displayed,its appearance remains the same.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
48
When obtaining the coordinates of the mouse,they are

A) always taken from the main form of the program
B) relative to the control that caused the event
C) taken from the center of the form
D) start from wherever the mouse is at that second
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
49
MouseUp and MouseDown events are used when the mouse moves up or down.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
50
The Directory class is found within the System namespace.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
51
What control should you use to restrict a user's choice to a specific range of numeric values,

A)NumericUpDown
B)TextBox
C)NumberBox
D)None of the above
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
52
When using mouse coordinates,(0,0)is located in the:

A) bottom left
B) bottom right
C) top left
D) top right
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
53
What is a tool tip useful for

A)tip of the mouse is blinks while hovering over an item in a GUI
B)the tip of the mouse is highlighted while hovering over an item in a GUI
C)displays helpful text under the mouse while hovering over an item in a GUI
D)All of the above
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
54
In order to find out which key the user is pressing you should use the:

A) KeyChar property to return the pressed key
B) Key property to return the pressed key
C) KeyPress property to return the pressed key
D) GetKey property to return the pressed key
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
55
The StretchImage property is used to:

A) change the size of the image to fit the PictureBox
B) change the size of the PictureBox to fit the image
C) find a medium between the PictureBox and the image
D) make the picture as large as possible while still maintaining quality
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
56
The AutoSize property is used to:

A) change the size of the image to fit the PictureBox
B) change the size of the PictureBox to fit the image
C) find a medium between the PictureBox and the actual picture
D) make the picture as large as possible while still maintaining quality
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
57
What does the ReadOnly property indicate

A)the number of the control cannot change
B)the user cannot click the buttons to select a number into the control
C)the user cannot type data into the control
D) all of the above
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
58
PictureBoxes can be used with ·gif,·jpg,bitmaps,icons and metafiles.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
59
CheckBoxes and RadioButtons have a CheckedChanged event that's raised whenever the state of that control is altered.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
60
The Clicks property of class MouseEventArgs is used to determine the number of times a Button was clicked.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
61
In order to use modifier keys you should:

A) use the ModifierKey event.
B) use the KeyData property.
C) use the ModifierKeyHandler.
D) modifier keys have to be dealt with manually.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
62
Pressing Enter to make a Button become depressed is not a key event;it's set in the control's properties.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
63
KeyPress events cannot deal with modifier keys.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
64
Key events are more important to the program than other events.
Unlock Deck
Unlock for access to all 64 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 64 flashcards in this deck.